added .quad asm directive

tcc-xref
bellard 2004-10-25 18:54:29 +00:00
parent 2a6c104722
commit e657dfb491
2 changed files with 28 additions and 0 deletions

View File

@ -361,6 +361,33 @@ static void asm_parse_directive(TCCState *s1)
}
ind += size;
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:
size = 1;
goto asm_data;

View File

@ -191,6 +191,7 @@
DEF_ASM(previous)
DEF_ASM(fill)
DEF_ASM(org)
DEF_ASM(quad)
#ifdef TCC_TARGET_I386