Support the X32 ABI with NASM sources

This commit is contained in:
Cameron Cawley authored and Paolo Bonzini committed 2026-03-12 12:01:34 +01:00
1 parent 832add07d2
commit f5fa2d108a
2 files changed
+9 -1

No files matched your search

+7 -1
View File
@@ -76,7 +76,13 @@ class NasmCompiler(ASMCompiler):
return True
def get_always_args(self) -> T.List[str]:
cpu = '64' if self.info.is_64_bit else '32'
if self.info.is_64_bit:
if self.info.cpu == 'x32':
cpu = 'x32'
else:
cpu = '64'
else:
cpu = '32'
if self.info.is_windows() or self.info.is_cygwin():
plat = 'win'
define = f'WIN{cpu}'
@@ -10,6 +10,8 @@ endif
if host_machine.cpu_family() == 'x86'
asm_format = 'elf32'
elif host_machine.cpu() == 'x32'
asm_format = 'elfx32'
else
asm_format = 'elf64'
endif