1 |
/* |
/* |
2 |
* Copyright (C) 2005 Anders Gavare. All rights reserved. |
* Copyright (C) 2005-2006 Anders Gavare. All rights reserved. |
3 |
* |
* |
4 |
* Redistribution and use in source and binary forms, with or without |
* Redistribution and use in source and binary forms, with or without |
5 |
* modification, are permitted provided that the following conditions are met: |
* modification, are permitted provided that the following conditions are met: |
25 |
* SUCH DAMAGE. |
* SUCH DAMAGE. |
26 |
* |
* |
27 |
* |
* |
28 |
* $Id: cpu_x86_instr.c,v 1.2 2005/11/06 22:41:12 debug Exp $ |
* $Id: cpu_x86_instr.c,v 1.5 2006/02/09 22:55:20 debug Exp $ |
29 |
* |
* |
30 |
* x86/amd64 instructions. |
* x86/amd64 instructions. |
31 |
* |
* |
76 |
X(to_be_translated) |
X(to_be_translated) |
77 |
{ |
{ |
78 |
uint64_t addr, low_pc; |
uint64_t addr, low_pc; |
79 |
|
#ifdef DYNTRANS_BACKEND |
80 |
|
int simple = 0; |
81 |
|
#endif |
82 |
unsigned char *page; |
unsigned char *page; |
83 |
int main_opcode; |
int main_opcode; |
84 |
unsigned char ib[17]; |
unsigned char ib[17]; |
85 |
void (*samepage_function)(struct cpu *, struct x86_instr_call *); |
/* void (*samepage_function)(struct cpu *, struct x86_instr_call *); */ |
86 |
|
|
87 |
/* Figure out the (virtual) address of the instruction: */ |
/* Figure out the (virtual) address of the instruction: */ |
88 |
low_pc = ((size_t)ic - (size_t)cpu->cd.x86.cur_ic_page) |
low_pc = ((size_t)ic - (size_t)cpu->cd.x86.cur_ic_page) |