mirror of
https://github.com/frida/tinycc
synced 2025-01-12 14:49:18 +03:00
added .quad asm directive
This commit is contained in:
parent
2a6c104722
commit
e657dfb491
27
tccasm.c
27
tccasm.c
@ -361,6 +361,33 @@ static void asm_parse_directive(TCCState *s1)
|
|||||||
}
|
}
|
||||||
ind += size;
|
ind += size;
|
||||||
break;
|
break;
|
||||||
|
case TOK_ASM_quad:
|
||||||
|
next();
|
||||||
|
for(;;) {
|
||||||
|
uint64_t vl;
|
||||||
|
const char *p;
|
||||||
|
|
||||||
|
p = tokc.cstr->data;
|
||||||
|
if (tok != TOK_PPNUM) {
|
||||||
|
error_constant:
|
||||||
|
error("64 bit constant");
|
||||||
|
}
|
||||||
|
vl = strtoll(p, (char **)&p, 0);
|
||||||
|
if (*p != '\0')
|
||||||
|
goto error_constant;
|
||||||
|
next();
|
||||||
|
if (sec->sh_type != SHT_NOBITS) {
|
||||||
|
/* XXX: endianness */
|
||||||
|
gen_le32(vl);
|
||||||
|
gen_le32(vl >> 32);
|
||||||
|
} else {
|
||||||
|
ind += 8;
|
||||||
|
}
|
||||||
|
if (tok != ',')
|
||||||
|
break;
|
||||||
|
next();
|
||||||
|
}
|
||||||
|
break;
|
||||||
case TOK_ASM_byte:
|
case TOK_ASM_byte:
|
||||||
size = 1;
|
size = 1;
|
||||||
goto asm_data;
|
goto asm_data;
|
||||||
|
Loading…
Reference in New Issue
Block a user