aboutsummaryrefslogtreecommitdiff
path: root/tccgen.c
diff options
context:
space:
mode:
authorgrischka <grischka>2009-12-17 21:09:53 +0100
committergrischka <grischka>2009-12-19 22:16:17 +0100
commitab4a4ab25e474dca8a84a8c43f923ba750b0b9c9 (patch)
tree9469db240769e9d0862b1f51a2fc704f51000353 /tccgen.c
parentd79b867d551510a64c4074c78d5737be16347fcc (diff)
downloadtinycc-ab4a4ab25e474dca8a84a8c43f923ba750b0b9c9.tar.gz
tinycc-ab4a4ab25e474dca8a84a8c43f923ba750b0b9c9.tar.bz2
x86-64: in gv(): ignore second register
Diffstat (limited to 'tccgen.c')
-rw-r--r--tccgen.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tccgen.c b/tccgen.c
index 2a03fb6..3c45646 100644
--- a/tccgen.c
+++ b/tccgen.c
@@ -448,11 +448,14 @@ int gv(int rc)
- constant
- lvalue (need to dereference pointer)
- already a register, but not in the right class */
- if (r >= VT_CONST ||
- (vtop->r & VT_LVAL) ||
- !(reg_classes[r] & rc) ||
- ((vtop->type.t & VT_BTYPE) == VT_LLONG &&
- !(reg_classes[vtop->r2] & rc2))) {
+ if (r >= VT_CONST
+ || (vtop->r & VT_LVAL)
+ || !(reg_classes[r] & rc)
+#ifndef TCC_TARGET_X86_64
+ || ((vtop->type.t & VT_BTYPE) == VT_LLONG && !(reg_classes[vtop->r2] & rc2))
+#endif
+ )
+ {
r = get_reg(rc);
#ifndef TCC_TARGET_X86_64
if ((vtop->type.t & VT_BTYPE) == VT_LLONG) {