mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 12:34:35 +03:00
[bug] Properly validate ADD[S]/SUB[S]/CMP/CMN with extend option
Extend option in ADD, ADDS, SUB, SUBS, CMP, and CMN instructions doesn't always use the same second register type. For example when extending from a BYTE the second source register must be W and not X. This change makes sure that the assembler accepts the correct combination and refuses the incorrect one. IMPORTANT: Although this is not an ABI change, the new behavior can break AArch64 code that used the incorrect signatures.
This commit is contained in:
@@ -177,13 +177,13 @@ static void generateGpSequenceInternal(
|
||||
cc.cmn(wA, wB);
|
||||
cc.cmn(xA, xB);
|
||||
cc.cmn(wA, wB, uxtb(2));
|
||||
cc.cmn(xA, xB, uxtb(2));
|
||||
cc.cmn(xA, wB, uxtb(2));
|
||||
cc.cmp(wA, 33);
|
||||
cc.cmp(xA, 33);
|
||||
cc.cmp(wA, wB);
|
||||
cc.cmp(xA, xB);
|
||||
cc.cmp(wA, wB, uxtb(2));
|
||||
cc.cmp(xA, xB, uxtb(2));
|
||||
cc.cmp(xA, wB, uxtb(2));
|
||||
cc.crc32b(wA, wB, wC);
|
||||
cc.crc32b(wzr, wB, wC);
|
||||
cc.crc32b(wA, wzr, wC);
|
||||
|
||||
Reference in New Issue
Block a user