Unified · Split
| @@ -233,7 +233,7 @@ void load(int r, SValue *sv) · 232 unmodified lines | ||
| 233 | 233 | } else if (v == VT_JMP || v == VT_JMPI) { |
| 234 | 234 | t = v & 1; |
| 235 | 235 | oad(0xb8 + r, t); /* mov $1, r */ |
| 236 | − oad(0xe9, 5); /* jmp after */ | |
| 236 | + o(0x05eb); /* jmp after */ | |
| 237 | 237 | gsym(fc); |
| 238 | 238 | oad(0xb8 + r, t ^ 1); /* mov $0, r */ |
| 239 | 239 | } else if (v != r) { |
| @@ -479,7 +479,14 @@ int gjmp(int t) · 239 unmodified lines | ||
| 479 | 479 | /* generate a jump to a fixed address */ |
| 480 | 480 | void gjmp_addr(int a) |
| 481 | 481 | { |
| 482 | − oad(0xe9, a - ind - 5); | |
| 482 | + int r; | |
| 483 | + r = a - ind - 2; | |
| 484 | + if (r == (char)r) { | |
| 485 | + g(0xeb); | |
| 486 | + g(r); | |
| 487 | + } else { | |
| 488 | + oad(0xe9, a - ind - 5); | |
| 489 | + } | |
| 483 | 490 | } |
| 484 | 491 | |
| 485 | 492 | /* generate a test. set 'inv' to invert test. Stack entry is popped */ |