scc: turn arguments the right way round
authorAlan Cox <alan@linux.intel.com>
Wed, 30 Nov 2016 18:44:37 +0000 (18:44 +0000)
committerAlan Cox <alan@linux.intel.com>
Wed, 30 Nov 2016 18:44:37 +0000 (18:44 +0000)
commitf8c9e9aefe8ab73ffdb582f117fe14f959a7a6cf
tree8187def7e4310449372cd67434d22557b4748989
parent7947e5c6b1ea3870e0f90fccfa55fce45d3fe862
scc: turn arguments the right way round

Small C has an irritating design feature that means it stacks arguments left
to right not right to left. Rather than working around this use a spool file
so we can put the code fragments in right to left order.

This totally changes the ABI, which is fine because we aren't using it for
anything and the old ABI is a PITA. With this done we can actually write sane
syscall stubs.

Would benefit from optimisations to also use the internal buffer as a stack
not just flush to the spool file as we stack code fragments.

Needless to say all the old varargs gunge is now a) broken and b) not needed
Applications/SmallC/Makefile
Applications/SmallC/Makefile.linux
Applications/SmallC/data.c
Applications/SmallC/data.h
Applications/SmallC/gen.c
Applications/SmallC/main.c
Applications/SmallC/outstack.c [new file with mode: 0644]
Applications/SmallC/primary.c
Applications/SmallC/prototype.h