diff options
| author | bellard <bellard> | 2004-10-25 18:54:29 +0000 |
|---|---|---|
| committer | bellard <bellard> | 2004-10-25 18:54:29 +0000 |
| commit | e657dfb4914afe3972c5bae8cd640b46c4048e8c (patch) | |
| tree | 4c61f9e06ae57963d1c2bf862a9ad94d7542fe6e /tccasm.c | |
| parent | 2a6c104722a95fa2b8cdee448b102cfd47a0b08e (diff) | |
| download | tinycc-e657dfb4914afe3972c5bae8cd640b46c4048e8c.tar.gz tinycc-e657dfb4914afe3972c5bae8cd640b46c4048e8c.tar.bz2 | |
added .quad asm directive
Diffstat (limited to 'tccasm.c')
| -rw-r--r-- | tccasm.c | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -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; |
