diff options
| author | James Lyon <jamesly0n@hotmail.com> | 2013-04-18 17:27:34 +0100 |
|---|---|---|
| committer | James Lyon <jamesly0n@hotmail.com> | 2013-04-18 17:27:34 +0100 |
| commit | 2bbfaf436f937ace4809d84be812ea1ac7fd7352 (patch) | |
| tree | 6e4f3f80611a8a471b5e84f42e05d2fd30f57e73 /arm-gen.c | |
| parent | ce5e12c2f950052d8109b6b7a56d900547705c08 (diff) | |
| download | tinycc-2bbfaf436f937ace4809d84be812ea1ac7fd7352.tar.gz tinycc-2bbfaf436f937ace4809d84be812ea1ac7fd7352.tar.bz2 | |
Tests in abitest.c now work on Win32.
I expect that Linux-x86 is probably fine. All other architectures
except ARM are definitely broken since I haven't yet implemented
gfunc_sret for these, although replicating the current behaviour
should be straightforward.
Diffstat (limited to 'arm-gen.c')
| -rw-r--r-- | arm-gen.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -800,6 +800,19 @@ int assign_fpreg(struct avail_regs *avregs, int align, int size) } #endif +/* Return 1 if this function returns via an sret pointer, 0 otherwise */ +ST_FUNC int gfunc_sret(CType *vt, CType *ret, int *align) { + size = type_size(vt, &align); + if (size > 4) { + return 1; + } else { + *align = 4; + ret->ref = NULL; + ret->t = VT_INT; + } + return 0; +} + /* Generate function call. The function address is pushed first, then all the parameters in call order. This functions pops all the parameters and the function address. */ |
