Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix handling of 64-bit SP updates in 2 space-separated chunks.
I heard recently that at least one CPU's Tarmac generator will emit AArch64 core register updates in the form 'R X0 01234567 89abcdef', with the 64-bit register contents divided into two tokens. I hadn't seen that before for core registers, but I had for vector registers - we already have a test case that updates Q0 in four 32-bit chunks. So this worked already for X0-X30. But it failed for SP, because there's a different code path for the special-case handling in which we wait to see whether we see 32 or 64 bits of data in order to decide whether it's AArch32 SP (aka r13) or AArch64 XSP. An SP update in that form was being misinterpreted as a 32-bit update to r13, because that code path hadn't noticed that the following token contained another 32 bits of data. While fixing that, I had to make sure not to break an edge case of CPSR updates (which also use that special code path, for a different reason). I haven't added a regression test for that edge case, because by great luck we already had one, on line 146 of parsertest.txt (as of this commit), reading "R cpsr 20000000 __C_".
- Loading branch information