ksherlock

Results 96 comments of ksherlock
trafficstars

I am interested in doing that. It looks like clang already recognizes `__attribute__((pascal))` but I didn't see any actual support. It may have been added for Borland's clang fork. ```...

For the `pascal` attribute (and all other calling conventions), `TargetInfo::checkCallingConvention` determines if it's allowed or not. Something like `--target=i386-pc-linux-gnu` [will allow it](https://github.com/llvm/llvm-project/blob/354eb88285c0d803b0674a3b2961b4109905383a/clang/lib/Basic/Targets/X86.h#L396-L416) Here's a [diff](https://github.com/ksherlock/llvm-project/commit/d87d06ad383da49b18d7dd0ac1607ec4d71a667f) that adds `iigs_inline(x, vector)` and...

The arguments are pushed in reversed order (from a C perspective). parameters are always an even number of bytes. There are a couple of tool calls that have a struct...

Thanks, that's working great. I was able to replace all the asm tool code in my test programs. Issues I've encountered: * -02 will optimize out the `ldx ##` *...

How do you interface with clang? I was assuming, based on strings (`-ffreestanding`, `-fno-signed-char`, `-fsigned-char`) you could just pass in `-fpascal-strings` and clang would take care of it. If you...

Thanks. A couple issues with pascal strings - ``` char *pstr_first = "\x10" "abc"; char *cstr_second = "abc"; char *cstr_first = "def"; char *pstr_second = "\x10" "def"; char pstr_array[] =...

-O2 still optimizes out the `ldx ##` ``` __attribute__((iigs(0x0102, 0xe10000))) void MMBootInit(void); void test(void) { MMBootInit(); } ``` ``` cc65816 -S -O2 test1.c ``` ``` __attribute__((iigs(0x200c, 0xe10000))) void WriteCString(const char...

The Pascal strings are still c strings so the trailing null should be present. Thanks.

Wonderful. I haven't encountered any issues with this build. Thanks!

This is not urgent. Thanks.