mirror of
git://repo.or.cz/tinycc.git
synced 2026-11-04 21:26:36 +08:00
allow $ at nonstarting positions in asm symbols under -fdollars-in-identifiers
e.g., asm("foo$bar: ret;");
This commit is contained in:
parent
543d84c668
commit
5675177b7f
4
tccasm.c
4
tccasm.c
@ -1100,7 +1100,7 @@ static void tcc_assemble_inline(TCCState *s1, const char *str, int len, int glob
|
|||||||
{
|
{
|
||||||
const int *saved_macro_ptr = macro_ptr;
|
const int *saved_macro_ptr = macro_ptr;
|
||||||
int dotid = set_idnum('.', IS_ID);
|
int dotid = set_idnum('.', IS_ID);
|
||||||
#ifndef TCC_TARGET_RISCV64
|
#if !defined(TCC_TARGET_RISCV64) && !defined(TCC_TARGET_X86_64)
|
||||||
int dolid = set_idnum('$', 0);
|
int dolid = set_idnum('$', 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1110,7 +1110,7 @@ static void tcc_assemble_inline(TCCState *s1, const char *str, int len, int glob
|
|||||||
tcc_assemble_internal(s1, 0, global);
|
tcc_assemble_internal(s1, 0, global);
|
||||||
tcc_close();
|
tcc_close();
|
||||||
|
|
||||||
#ifndef TCC_TARGET_RISCV64
|
#if !defined(TCC_TARGET_RISCV64) && !defined(TCC_TARGET_X86_64)
|
||||||
set_idnum('$', dolid);
|
set_idnum('$', dolid);
|
||||||
#endif
|
#endif
|
||||||
set_idnum('.', dotid);
|
set_idnum('.', dotid);
|
||||||
|
|||||||
2
tccpp.c
2
tccpp.c
@ -3712,7 +3712,7 @@ ST_FUNC void preprocess_start(TCCState *s1, int filetype)
|
|||||||
s1->pack_stack[0] = 0;
|
s1->pack_stack[0] = 0;
|
||||||
s1->pack_stack_ptr = s1->pack_stack;
|
s1->pack_stack_ptr = s1->pack_stack;
|
||||||
|
|
||||||
set_idnum('$', !is_asm && s1->dollars_in_identifiers ? IS_ID : 0);
|
set_idnum('$', s1->dollars_in_identifiers ? IS_ID : 0);
|
||||||
set_idnum('.', is_asm ? IS_ID : 0);
|
set_idnum('.', is_asm ? IS_ID : 0);
|
||||||
|
|
||||||
if (!(filetype & AFF_TYPE_ASM)) {
|
if (!(filetype & AFF_TYPE_ASM)) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user