Commit Graph

7 Commits

Author SHA1 Message Date
Scott Graham
d166a61141 Implementation of Windows amd64_win target
This is an implementation of the Windows ABI. It supports most features
(struct passing/returning, varargs, env). TLS is not yet supported.

This patch does not actually port QBE to Windows, it only allows QBE to
generate correct asm to target Windows. As a result, testing is
accomplished on a Linux host, by using a cross-compiling toolchain, and
running the resulting binaries by using wine. See:

	TARGET=amd64_win tools/test.sh all

A few cross-platform tests were changed from 'long' to 'long long' in
driver code because long in C does not match the size of a QBE 'l' on
Windows.
2026-02-12 09:17:17 +01:00
Quentin Carbonneaux
e6debbbb02 two new tests in abi5.ssa
They are meant to exercise the
hardware floating-point calling
convention of the risc-v target.
2022-03-10 22:46:57 +01:00
Quentin Carbonneaux
fcdef10dae make variadic args explicit
Some abis, like the riscv one, treat
arguments differently depending on
whether they are variadic or not.
To prepare for the upcomming riscv
target, we change the variadic call
syntax and give meaning to the
location of the '...' marker.

  # new syntax
  %ret =w call $f(w %regular, ..., w %variadic)

By nature of their abis, the change
is backwards compatible for existing
targets.
2021-10-22 23:53:25 +02:00
Quentin Carbonneaux
b99a8b0d07 support variable argument lists
This change is backward compatible, calls to
"variadic" functions (like printf) must now be
annotated (with ...).
2017-02-10 11:05:54 -05:00
Quentin Carbonneaux
cad13d0dce add support for unions in sysv abi 2016-08-16 13:28:55 -07:00
Quentin Carbonneaux
1b4943eb1f implement export control 2016-03-28 14:57:20 -04:00
Quentin Carbonneaux
36635660b4 extract tests out of src 2016-03-27 15:00:45 -04:00