Post Aa1IEEgrFSNhr1sjLs by gparker@discuss.systems
 (DIR) More posts by gparker@discuss.systems
 (DIR) Post #Aa1HbX1n8T5XQxDYmG by shac@ioc.exchange
       2023-09-20T22:11:38Z
       
       1 likes, 2 repeats
       
       Ten years ago today #Apple launched the #iPhone 5S and announced the #arm64 CPU inside. It was the first public disclosure of a 64-bit ARM architecture, and it was available for you to buy in a phone. Nobody else was even close to having a chip ready to tape out, much less put in a product, and it was a performance monster.
       
 (DIR) Post #Aa1HbZZXfxH3KD1Xf6 by shac@ioc.exchange
       2023-09-20T22:23:23Z
       
       1 likes, 0 repeats
       
       For many of us it was the culmination of years of effort creating this chip and porting all of our software to it. I was working on the kernel and EL3 monitor. When we started we had no compiler, no assembler, no debugger, and really no documentation and the ISA still in flux. Someone wrote a macro-based assembler. Code gen bugs were a huge problem as clang was adding support. LLDB never caught up so someone on my team did a port of GDB.
       
 (DIR) Post #Aa1Hbb6XyjGk4rTPkG by shac@ioc.exchange
       2023-09-20T22:29:50Z
       
       1 likes, 0 repeats
       
       I skipped thanksgiving vacation 2012 because FPGAs were coming in. We were booted to Springboard in about a week, the result of a huge amount of preparation in simulation. The first tapeout booted in one day. I remember talking to an Arm engineer about that time and was not allowed to say where we were, but gathered their core was still purely software simulation.
       
 (DIR) Post #Aa1HbfEUd80AsfDoga by shac@ioc.exchange
       2023-09-20T22:36:15Z
       
       1 likes, 0 repeats
       
       When iOS shipped, it was a full 64-bit native release. There was no 32-bit code in the OS image* (including complicated things like the Safari JavaScript engine). Everything was ported day one.*except the bits required to support 32-bit third party apps
       
 (DIR) Post #Aa1HbgLySna2M9jIzA by shac@ioc.exchange
       2023-09-20T22:45:28Z
       
       1 likes, 0 repeats
       
       The reception was very confused. Most of the tech pundits didn’t understand why a phone needed a 64-bit processor. They mostly focused on the ability to have more than 4 gigs of memory (5S had 1gb). When they got it in their hands they knew. Apples first core, Swift, was released in the previous year and it was a perf leader. This chip was much faster than that, it was an insane leap that put Apple 3-5 years ahead of the rest of the industry.
       
 (DIR) Post #Aa1HbhLImmdXQMQHZo by shac@ioc.exchange
       2023-09-21T00:27:52Z
       
       1 likes, 0 repeats
       
       My favorite quote:“I know there's a lot of noise because Apple did [64-bit] on their A7," said [Qualcomm senior vice president and chief marketing officer] Anand Chandrasekher. "I think they are doing a marketing gimmick. There's zero benefit a consumer gets from that.""Predominantly... you need it for memory addressability beyond 4GB. That's it. You don't really need it for performance, and the kinds of applications that 64-bit get used in mostly are large, server-class applications," said Chandrasekher.
       
 (DIR) Post #Aa1HiLQWfNcPTs2Gv2 by siguza@infosec.exchange
       2023-09-20T22:52:05Z
       
       1 likes, 0 repeats
       
       @shac the toolchain situation must've been madness. Just reversing an A7 ROM, the assembly is so distinct that it's obvious that compiler was barely ready.
       
 (DIR) Post #Aa1HuO9KMyiROqjaK0 by dougall@mastodon.social
       2023-09-21T00:39:58Z
       
       0 likes, 0 repeats
       
       @shac Yeah, I remember that I didn't see why you'd double the size of all your pointers at the time. Chrome stuck with 32-bit builds on low memory devices for the longest time, but Safari was faster anyway.Who designed the ISA? Was it was mainly designed/motivated by Apple?
       
 (DIR) Post #Aa1HuOt3cxINgg86bI by shac@ioc.exchange
       2023-09-21T00:55:00Z
       
       1 likes, 1 repeats
       
       @dougall The ISA was designed by Arm. It was commissioned by Apple to align with its microarchitecture goals. Other customers were involved in the design process. I have little insight into their contribution, but Apple was clearly doing the driving in the early years.Double size pointers hurt us a lot. It was about 15% increase in heap usage IIRC. But TBI pointer tagging was a big perf gain for ObjC and JavaScript.
       
 (DIR) Post #Aa1IDTVCgy8HVH4GA4 by gparker@discuss.systems
       2023-09-21T04:52:53Z
       
       1 likes, 1 repeats
       
       @shac @dougall ObjC didn't use TBI itself, but we did use the extra pointer bits in several places to improve speed and memory size. There were plenty of bits to steal because back then the address space actually supported by the hardware and the kernel was limited (35 bits, maybe?)
       
 (DIR) Post #Aa1IDt4rbWVmp6waiO by shac@ioc.exchange
       2023-09-21T05:18:24Z
       
       1 likes, 0 repeats
       
       @gparker @dougall The request to enable TBI came from the top of DT, so I assumed it was for runtime support.VA size was configurable, it was probably set to 36 bits.
       
 (DIR) Post #Aa1IEEgrFSNhr1sjLs by gparker@discuss.systems
       2023-09-21T07:19:26Z
       
       1 likes, 0 repeats
       
       @shac @dougall Swift was in early development at the time and they anticipated using TBI for compact Optionals and other tagged unions.