Re:The cost of forsaking C
by GFK_of_xmaspast on Wednesday October 05, 2016 @12:51PM
(#12645540)
> The reason C didn't expose registers
Uh ... http://ee.hawaii.edu/~tep/EE160/Book/chap14/subsection2.1.1....
Re:The cost of forsaking C
by nickpsecurity on Wednesday October 05, 2016 @02:02PM
(#12646197)
Yeah, I've used the keyword myself but it was discouraged. Instead, we were taught to work with the local variables, stack, frame, heap, etc. It's technically in there at some point as a compiler hint but the internal structure reflects the PDP's. So, I partly take the comment back in that it was there but not standard practice.
Decisions like that and x86 is why stack operations are still dangerous despite B5000 (1961) having protected stack and MULTICS (UNIX/C predecessor) having reverse stack immune to overflow. C kept the shitty PDP stack instead of MULTICS for performance. Reverse stack on x86 still has performance hit due to that decision. It's why Itanium did shadow stack in hardware.
Not clever design or forward thinking. Just making it work on a PDP with long-term problems following.