char *Sarm[4]={"sb","sh","",""}; // Sign-extend ARM Extensions for operand sizes 0,1,2\r
int Cycles; // Current cycles for opcode\r
int pc_dirty; // something changed PC during processing\r
char *Sarm[4]={"sb","sh","",""}; // Sign-extend ARM Extensions for operand sizes 0,1,2\r
int Cycles; // Current cycles for opcode\r
int pc_dirty; // something changed PC during processing\r
for(i=0, len=strlen(format); i < len && format[i] != '\n'; i++);\r
if(i < len-1 && format[len-1] != '\n') printf("\nWARNING: possible improper newline placement:\n%s\n", format);\r
\r
for(i=0, len=strlen(format); i < len && format[i] != '\n'; i++);\r
if(i < len-1 && format[len-1] != '\n') printf("\nWARNING: possible improper newline placement:\n%s\n", format);\r
\r
va_start(valist,format);\r
if (AsmFile) vfprintf(AsmFile,format,valist);\r
va_end(valist);\r
va_start(valist,format);\r
if (AsmFile) vfprintf(AsmFile,format,valist);\r
va_end(valist);\r
if (ms) ot("CycloneSetSr\n");\r
else ot("CycloneSetSr:\n");\r
ot(" mov r2,r1,lsr #8\n");\r
if (ms) ot("CycloneSetSr\n");\r
else ot("CycloneSetSr:\n");\r
ot(" mov r2,r1,lsr #8\n");\r
ot(" str r3,[r0,#0x3C]\n");\r
ot(" str r2,[r0,#0x48]\n");\r
ot("setsr_noswap%s\n",ms?"":":");\r
ot(" str r3,[r0,#0x3C]\n");\r
ot(" str r2,[r0,#0x48]\n");\r
ot("setsr_noswap%s\n",ms?"":":");\r
- ot(" mov r2,r1,lsr #3\n");\r
- ot(" strb r2,[r0,#0x45] ;@ the X flag\n");\r
+ ot(" mov r2,r1,lsl #25\n");\r
+ ot(" str r2,[r0,#0x4c] ;@ the X flag\n");\r
ot(" bic r2,r1,#0xf3\n");\r
ot(" tst r1,#1\n");\r
ot(" orrne r2,r2,#2\n");\r
ot(" bic r2,r1,#0xf3\n");\r
ot(" tst r1,#1\n");\r
ot(" orrne r2,r2,#2\n");\r
ot(" orrne r2,r2,#2\n");\r
ot(" tst r1,#2\n");\r
ot(" orrne r2,r2,#1\n");\r
ot(" orrne r2,r2,#2\n");\r
ot(" tst r1,#2\n");\r
ot(" orrne r2,r2,#1\n");\r
- ot(" ldrb r1,[r0,#0x45] ;@ the X flag\n");\r
- ot(" tst r1,#2\n");\r
+ ot(" ldr r1,[r0,#0x4c] ;@ the X flag\n");\r
+ ot(" tst r1,#0x20000000\n");\r
ot(" orrne r2,r2,#0x10\n");\r
ot(" ldrb r1,[r0,#0x44] ;@ the SR high\n");\r
ot(" orr r0,r2,r1,lsl #8\n");\r
ot(" orrne r2,r2,#0x10\n");\r
ot(" ldrb r1,[r0,#0x44] ;@ the SR high\n");\r
ot(" orr r0,r2,r1,lsl #8\n");\r
ot(" ldr pc,[r7,#0x%x] ;@ Call ",func);\r
\r
// Document what we are calling:\r
ot(" ldr pc,[r7,#0x%x] ;@ Call ",func);\r
\r
// Document what we are calling:\r
printf("Creating Opcodes: [");\r
\r
ot(";@ ---------------------------- Opcodes ---------------------------\n");\r
printf("Creating Opcodes: [");\r
\r
ot(";@ ---------------------------- Opcodes ---------------------------\n");\r