diff options
Diffstat (limited to 'x86_64-gen.c')
| -rw-r--r-- | x86_64-gen.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/x86_64-gen.c b/x86_64-gen.c index 19418fd..921813b 100644 --- a/x86_64-gen.c +++ b/x86_64-gen.c @@ -1686,8 +1686,21 @@ void gjmp_addr(int a) } } +ST_FUNC void gtst_addr(int inv, int a) +{ + inv ^= (vtop--)->c.i; + a -= ind + 2; + if (a == (char)a) { + g(inv - 32); + g(a); + } else { + g(0x0f); + oad(inv - 16, a - 4); + } +} + /* generate a test. set 'inv' to invert test. Stack entry is popped */ -int gtst(int inv, int t) +ST_FUNC int gtst(int inv, int t) { int v = vtop->r & VT_VALMASK; if (v == VT_CMP) { |
