tccasm: Implement .set sym, expr

That, as well as "sym = expr", if expr contains symbols.
Slightly tricky because a definition from .set is overridable,
whereas proper definitions aren't.

This doesn't yet allow using this for override tricks from C
and global asm blocks because the symbol tables from C and asm
are separate.
This commit is contained in:
Michael Matz
2016-08-07 04:27:32 +02:00
parent 34fc6435ee
commit c4edfb4e08
3 changed files with 61 additions and 16 deletions

View File

@ -824,6 +824,17 @@ nop
.skip (-((4b-3b) > 0) * 2) , 0x90
.popsection
.globl overrideme
.weak overrideme
nop
.globl notimplemented
notimplemented:
ret
.set overrideme, notimplemented
overrideme = notimplemented
overrideme:
ret
movd %esi, %mm1
movd %edi, %xmm2
movd (%ebx), %mm3