Mercurial > hg > index.cgi
comparison lwasm/insn_rtor.c @ 128:3a5f718b24c1
Fixed swapped register lists for 6309/6809 register-to-register instructions
author | lost@l-w.ca |
---|---|
date | Thu, 11 Aug 2011 22:04:09 -0600 |
parents | 2c24602be78f |
children | c6d2a1f54e0c |
comparison
equal
deleted
inserted
replaced
127:d92b9c968731 | 128:3a5f718b24c1 |
---|---|
32 // register to register (r0,r1) | 32 // register to register (r0,r1) |
33 // registers are in order: | 33 // registers are in order: |
34 // D,X,Y,U,S,PC,W,V | 34 // D,X,Y,U,S,PC,W,V |
35 // A,B,CC,DP,0,0,E,F | 35 // A,B,CC,DP,0,0,E,F |
36 | 36 |
37 r0 = lwasm_lookupreg2((as -> target == TARGET_6309) ? regs9 : regs, p); | 37 r0 = lwasm_lookupreg2((as -> target == TARGET_6309) ? regs : regs9, p); |
38 if (r0 < 0 || *(*p)++ != ',') | 38 if (r0 < 0 || *(*p)++ != ',') |
39 { | 39 { |
40 lwasm_register_error(as, l, "Bad operand"); | 40 lwasm_register_error(as, l, "Bad operand"); |
41 r0 = r1 = 0; | 41 r0 = r1 = 0; |
42 } | 42 } |
43 else | 43 else |
44 { | 44 { |
45 r1 = lwasm_lookupreg2((as -> target = TARGET_6309) ? regs9 : regs, p); | 45 r1 = lwasm_lookupreg2((as -> target == TARGET_6309) ? regs : regs9, p); |
46 if (r1 < 0) | 46 if (r1 < 0) |
47 { | 47 { |
48 lwasm_register_error(as, l, "Bad operand"); | 48 lwasm_register_error(as, l, "Bad operand"); |
49 r0 = r1 = 0; | 49 r0 = r1 = 0; |
50 } | 50 } |