History

added .quad asm directive

bellard committed 22 years ago

Commit e657dfb1 parent 2a6c1042 files · +28 −0Browse files

Unified · Split

2 files
  1. tccasm.c +27 −0
  2. tcctok.h +1 −0
tccasm.c+27−0
@@ -361,6 +361,33 @@ static void asm_parse_directive(TCCState *s1) · 360 unmodified lines
361 }361 }
362 ind += size;362 ind += size;
363 break;363 break;
364 case TOK_ASM_quad:
365 next();
366 for(;;) {
367 uint64_t vl;
368 const char *p;
369
370 p = tokc.cstr->data;
371 if (tok != TOK_PPNUM) {
372 error_constant:
373 error("64 bit constant");
374 }
375 vl = strtoll(p, (char **)&p, 0);
376 if (*p != '\0')
377 goto error_constant;
378 next();
379 if (sec->sh_type != SHT_NOBITS) {
380 /* XXX: endianness */
381 gen_le32(vl);
382 gen_le32(vl >> 32);
383 } else {
384 ind += 8;
385 }
386 if (tok != ',')
387 break;
388 next();
389 }
390 break;
364 case TOK_ASM_byte:391 case TOK_ASM_byte:
365 size = 1;392 size = 1;
366 goto asm_data;393 goto asm_data;
tcctok.h+1−0
@@ -191,6 +191,7 @@ · 190 unmodified lines
191 DEF_ASM(previous)191 DEF_ASM(previous)
192 DEF_ASM(fill)192 DEF_ASM(fill)
193 DEF_ASM(org)193 DEF_ASM(org)
194 DEF_ASM(quad)
194 195
195#ifdef TCC_TARGET_I386196#ifdef TCC_TARGET_I386
196 197

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t