x86-64-asm: Clean up 64bit immediate support

Fix it to actually be able to parse 64bit immediates (enlarge
operand value type).  Then, generally there's no need for accepting
IM64 anywhere, except in the 0xba+r mov opcodes, so OP_IM is
unnecessary, as is OPT_IMNO64.  Improve the generated code a bit
by preferring the 0xc7 opcode for im32->reg64, instead of the
im64->reg64 form (which we therefore hardcode).
This commit is contained in:
Michael Matz
2016-05-11 23:47:02 +02:00
parent f3cee9ceff
commit b9f01dffc6
5 changed files with 39 additions and 24 deletions

View File

@ -41,7 +41,8 @@ static Sym sym_dot;
static void asm_expr_unary(TCCState *s1, ExprValue *pe)
{
Sym *sym;
int op, n, label;
int op, label;
long n;
const char *p;
switch(tok) {