Earlier quoted context omitted.
Hardly an Apple specific issue. People have been writing non-portable assembly for pretty much every architecture for as long as assembly has been a thing. Heck, people write non-portable C and C++ too by using compiler specific extensions or intrinsics all the time too, that only end up working on very specific stacks. Or when you go to web and people target browser specific extensions and behaviour. Developers will…
I agree. Not to mention planned obsolescence of C and c++ syntax via ISO, that on a medium cycle (5/10 years). With c++ it is even worse: its syntax complexity is grotesque and absurd, it requires beyond sanity compilers, hence limiting to very few the ones which actually "work". c++ and similar should be avoided like hell. But C has already a waaaaay too rich and complex syntax: integer promotion, enum, switch, type…
Writing Portable ARM64 Assembly
11–20 of 22 posts
Re: Writing Portable ARM64 Assembly
#12Earlier quoted context omitted.
Hardly an Apple specific issue. People have been writing non-portable assembly for pretty much every architecture for as long as assembly has been a thing. Heck, people write non-portable C and C++ too by using compiler specific extensions or intrinsics all the time too, that only end up working on very specific stacks. Or when you go to web and people target browser specific extensions and behaviour. Developers will…
To be fair writing trully portable C that does useful things is not that simple. When was the last time you made sure your code supports CHAR_BIT != 8 for example.
Re: Writing Portable ARM64 Assembly
#13Re: Writing Portable ARM64 Assembly
#14Earlier quoted context omitted.
To be fair writing trully portable C that does useful things is not that simple. When was the last time you made sure your code supports CHAR_BIT != 8 for example.
I thought that because the C standard requires sizeof(char) to be 1, CHAR_BIT cannot be anything other than 8, unless the architecture is redefining what 'byte' means.
Re: Writing Portable ARM64 Assembly
#15Earlier quoted context omitted.
To be fair writing trully portable C that does useful things is not that simple. When was the last time you made sure your code supports CHAR_BIT != 8 for example.
I thought that because the C standard requires sizeof(char) to be 1, CHAR_BIT cannot be anything other than 8, unless the architecture is redefining what 'byte' means.
I think I remember somebody pointing to such a machine in some special area (Telco?) still in use in a previous discussion here ... but if that still exists it's very very rare and mostly historical.
Re: Writing Portable ARM64 Assembly
#16Re: Writing Portable ARM64 Assembly
#17Earlier quoted context omitted.
Hardly an Apple specific issue. People have been writing non-portable assembly for pretty much every architecture for as long as assembly has been a thing. Heck, people write non-portable C and C++ too by using compiler specific extensions or intrinsics all the time too, that only end up working on very specific stacks. Or when you go to web and people target browser specific extensions and behaviour. Developers will…
To be fair writing trully portable C that does useful things is not that simple. When was the last time you made sure your code supports CHAR_BIT != 8 for example.
But yeah, when you get into multiple architectures, it gets gnarly. Take even something as simple as instruction ordering when porting from x86_64 to arm64
Re: Writing Portable ARM64 Assembly
#18Earlier quoted context omitted.
I thought that because the C standard requires sizeof(char) to be 1, CHAR_BIT cannot be anything other than 8, unless the architecture is redefining what 'byte' means.
The possibility for a byte to be something other than 8 bit is the reason, why some people refer to 8 bit as octet in network protocols etc. I think I remember somebody pointing to such a machine in some special area (Telco?) still in use in a previous discussion here ... but if that still exists it's very very rare and mostly historical.
Re: Writing Portable ARM64 Assembly
#19ISA specific extensions has been a thing on ARM before Apple.
Re: Writing Portable ARM64 Assembly
#20ISA specific extensions has been a thing on ARM before Apple.
That's true, but before M1, ARM was a lot more diverse, so software developers were way less likely to recklessly treat any single company's extensions as if they were part of the ARM spec.