Advertising
Binary Loader's bug
Forum rules
This forum is for HBL Development discussions ONLY. For User support or HBL general discussions, go to viewforum.php?f=3 . Messages that are not development related will be deleted.
This forum is for HBL Development discussions ONLY. For User support or HBL general discussions, go to viewforum.php?f=3 . Messages that are not development related will be deleted.
-
coyotebean
- Guru
- Posts: 96
- Joined: Mon Sep 27, 2010 3:22 pm
Re: Binary Loader's bug
The thing is ABI & EABI defines that only s registers are preserved. Any software (compilers) compliance to the standard will ignore the value of other registers returned in a function.
GBASP x1, GBM x2, NDSL x2, PSP 100X x3, PSP 200X x6, PSP 300X x5, PSP Go x4, Wii x1
Re: Binary Loader's bug
You already said that before. We're talking about two different levels. You're talking about ABI and I'm talking about C prototypes. Yes, aX can be modified, but if a C prototype declares them by value, the C compiler (because it's a C compiler, it should enforce C protocols, on top of ABI ones) should make sure they're not modified. If the arguments were passed by reference, they can be modified. That's why the ABI leaves aX as modifiable by callee: it's defined on a higher level (like C).
Advertising
I wanna lots of mov al,0xb

"just not into this RA stuffz"

"just not into this RA stuffz"
Re: Binary Loader's bug
I don't really understand why you think a compiled C program should stick to the ABI rules, as long as gcc knows it's equivalent, I think you can trust it.
Or am I missing a bigger problem here?
Edit: It could be that parameters such as -O allow your C compiler to not follow some rules that would hurt performance.
Or am I missing a bigger problem here?
Edit: It could be that parameters such as -O allow your C compiler to not follow some rules that would hurt performance.
If you need US PSN Codes, this technique is what I recommend.
Looking for guest bloggers and news hunters here at wololo.net, PM me!
Looking for guest bloggers and news hunters here at wololo.net, PM me!
Re: Binary Loader's bug
In fact, the C compiler also MUST preserve the ABI rules, but also the C rules. They're layers. First is the ABI set of rules, then the C set of rules, and so on. I hope this clears what I mean.Wololo wrote:I don't really understand why you think a compiled C program should stick to the ABI rules
I don't think you can skip ABI & C rules by using compiler parameters. AFAIK GCC optimization flags only adapt your code to be optimized based on the ABI and C rules.Wololo wrote:Edit: It could be that parameters such as -O allow your C compiler to not follow some rules that would hurt performance.
I wanna lots of mov al,0xb

"just not into this RA stuffz"

"just not into this RA stuffz"
