From be43c8e0ed22faa6c89c6e551f2a07512673d60d Mon Sep 17 00:00:00 2001 From: Shinichiro Hamaji Date: Thu, 16 Apr 2009 01:32:16 +0900 Subject: x86-64: Cast from 64bit pointer to long long must not generate movslq. --- tcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tcc.c') diff --git a/tcc.c b/tcc.c index ec5a47d..1b0db21 100644 --- a/tcc.c +++ b/tcc.c @@ -6228,7 +6228,7 @@ static void gen_cast(CType *type) vpop(); #else int r = gv(RC_INT); - if (sbt != (VT_INT | VT_UNSIGNED)) { + if (sbt != (VT_INT | VT_UNSIGNED) && sbt != VT_PTR) { /* x86_64 specific: movslq */ o(0x6348); o(0xc0 + (REG_VALUE(r) << 3) + REG_VALUE(r)); -- cgit v1.3.1