aboutsummaryrefslogtreecommitdiff
path: root/i386-gen.c
diff options
context:
space:
mode:
Diffstat (limited to 'i386-gen.c')
-rw-r--r--i386-gen.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/i386-gen.c b/i386-gen.c
index eace2df..79087d0 100644
--- a/i386-gen.c
+++ b/i386-gen.c
@@ -695,6 +695,19 @@ ST_FUNC 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 */
ST_FUNC int gtst(int inv, int t)
{