News for hackers. Stuff that matters.
Re:Generating a QR code with only ARM Assembly by haolez on Wednesday September 08, 2021 @08:04PM (#28464579)
Wouldn't -Os optimize for size better than hand-crafted ASM? Genuine question.
Re:Generating a QR code with only ARM Assembly by userbinator on Wednesday September 08, 2021 @09:20PM (#28465128)
My experience is mostly with x86, where the answer is a definitive "no"; for ARM, my guess is "likely no" --- it's a RISC, so instruction selection isn't as critical, and all instructions are fixed-width so again there isn't as much flexibility in instruction selection (e.g. in x86 a "xor reg, reg" is the canonical way to zero a register, and explicit loading with a constant 0 is very much discouraged and a few bytes bigger, even compilers know about that now.) That said, I've also seen compilers do ridiculous stupid things which no human ever would.
Re:Generating a QR code with only ARM Assembly by MaxLeiter on Wednesday September 08, 2021 @10:23PM (#28465513)
Cant speak much for x86, but for many older / less common architectures (I can speak for z80) the compilers aren’t as advanced or are missing extensive optimizations.