-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[AArch64] Add assembly/disaasembly of atomic ld/st #112892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10378,6 +10378,78 @@ defm : PromoteBinaryv8f16Tov4f32<any_fdiv, FDIVv4f32>; | |
| defm : PromoteBinaryv8f16Tov4f32<any_fmul, FMULv4f32>; | ||
| defm : PromoteBinaryv8f16Tov4f32<any_fsub, FSUBv4f32>; | ||
|
|
||
| //===----------------------------===// | ||
| // 2024 Architecture Extensions: | ||
|
||
| //===----------------------------===// | ||
|
|
||
| let Predicates = [HasLSFE] in { | ||
| // Floating-point Atomic Load | ||
| defm LDFADDA : AtomicFPLoad<0b10, 0b000, "ldfadda">; | ||
| defm LDFADDAL : AtomicFPLoad<0b11, 0b000, "ldfaddal">; | ||
| defm LDFADD : AtomicFPLoad<0b00, 0b000, "ldfadd">; | ||
| defm LDFADDL : AtomicFPLoad<0b01, 0b000, "ldfaddl">; | ||
| defm LDFMAXA : AtomicFPLoad<0b10, 0b100, "ldfmaxa">; | ||
| defm LDFMAXAL : AtomicFPLoad<0b11, 0b100, "ldfmaxal">; | ||
| defm LDFMAX : AtomicFPLoad<0b00, 0b100, "ldfmax">; | ||
| defm LDFMAXL : AtomicFPLoad<0b01, 0b100, "ldfmaxl">; | ||
| defm LDFMINA : AtomicFPLoad<0b10, 0b101, "ldfmina">; | ||
| defm LDFMINAL : AtomicFPLoad<0b11, 0b101, "ldfminal">; | ||
| defm LDFMIN : AtomicFPLoad<0b00, 0b101, "ldfmin">; | ||
| defm LDFMINL : AtomicFPLoad<0b01, 0b101, "ldfminl">; | ||
| defm LDFMAXNMA : AtomicFPLoad<0b10, 0b110, "ldfmaxnma">; | ||
| defm LDFMAXNMAL : AtomicFPLoad<0b11, 0b110, "ldfmaxnmal">; | ||
| defm LDFMAXNM : AtomicFPLoad<0b00, 0b110, "ldfmaxnm">; | ||
| defm LDFMAXNML : AtomicFPLoad<0b01, 0b110, "ldfmaxnml">; | ||
| defm LDFMINNMA : AtomicFPLoad<0b10, 0b111, "ldfminnma">; | ||
| defm LDFMINNMAL : AtomicFPLoad<0b11, 0b111, "ldfminnmal">; | ||
| defm LDFMINMN : AtomicFPLoad<0b00, 0b111, "ldfminnm">; | ||
| defm LDFMINNML : AtomicFPLoad<0b01, 0b111, "ldfminnml">; | ||
| // BFloat16 | ||
| def LDBFADDA : BaseAtomicFPLoad<FPR16, 0b00, 0b10, 0b000, "ldbfadda">; | ||
| def LDBFADDAL : BaseAtomicFPLoad<FPR16, 0b00, 0b11, 0b000, "ldbfaddal">; | ||
| def LDBFADD : BaseAtomicFPLoad<FPR16, 0b00, 0b00, 0b000, "ldbfadd">; | ||
| def LDBFADDL : BaseAtomicFPLoad<FPR16, 0b00, 0b01, 0b000, "ldbfaddl">; | ||
| def LDBFMAXA : BaseAtomicFPLoad<FPR16, 0b00, 0b10, 0b100, "ldbfmaxa">; | ||
| def LDBFMAXAL : BaseAtomicFPLoad<FPR16, 0b00, 0b11, 0b100, "ldbfmaxal">; | ||
| def LDBFMAX : BaseAtomicFPLoad<FPR16, 0b00, 0b00, 0b100, "ldbfmax">; | ||
| def LDBFMAXL : BaseAtomicFPLoad<FPR16, 0b00, 0b01, 0b100, "ldbfmaxl">; | ||
| def LDBFMINA : BaseAtomicFPLoad<FPR16, 0b00, 0b10, 0b101, "ldbfmina">; | ||
| def LDBFMINAL : BaseAtomicFPLoad<FPR16, 0b00, 0b11, 0b101, "ldbfminal">; | ||
| def LDBFMIN : BaseAtomicFPLoad<FPR16, 0b00, 0b00, 0b101, "ldbfmin">; | ||
| def LDBFMINL : BaseAtomicFPLoad<FPR16, 0b00, 0b01, 0b101, "ldbfminl">; | ||
| def LDBFMAXNMA : BaseAtomicFPLoad<FPR16, 0b00, 0b10, 0b110, "ldbfmaxnma">; | ||
| def LDBFMAXNMAL : BaseAtomicFPLoad<FPR16, 0b00, 0b11, 0b110, "ldbfmaxnmal">; | ||
| def LDBFMAXNM : BaseAtomicFPLoad<FPR16, 0b00, 0b00, 0b110, "ldbfmaxnm">; | ||
| def LDBFMAXNML : BaseAtomicFPLoad<FPR16, 0b00, 0b01, 0b110, "ldbfmaxnml">; | ||
| def LDBFMINNMA : BaseAtomicFPLoad<FPR16, 0b00, 0b10, 0b111, "ldbfminnma">; | ||
| def LDBFMINNMAL : BaseAtomicFPLoad<FPR16, 0b00, 0b11, 0b111, "ldbfminnmal">; | ||
| def LDBFMINNM : BaseAtomicFPLoad<FPR16, 0b00, 0b00, 0b111, "ldbfminnm">; | ||
| def LDBFMINNML : BaseAtomicFPLoad<FPR16, 0b00, 0b01, 0b111, "ldbfminnml">; | ||
|
|
||
| // Floating-point Atomic Store | ||
| defm STFADD : AtomicFPStore<0b0, 0b000, "stfadd">; | ||
| defm STFADDL : AtomicFPStore<0b1, 0b000, "stfaddl">; | ||
| defm STFMAX : AtomicFPStore<0b0, 0b100, "stfmax">; | ||
| defm STFMAXL : AtomicFPStore<0b1, 0b100, "stfmaxl">; | ||
| defm STFMIN : AtomicFPStore<0b0, 0b101, "stfmin">; | ||
| defm STFMINL : AtomicFPStore<0b1, 0b101, "stfminl">; | ||
| defm STFMAXNM : AtomicFPStore<0b0, 0b110, "stfmaxnm">; | ||
| defm STFMAXNML : AtomicFPStore<0b1, 0b110, "stfmaxnml">; | ||
| defm STFMINNM : AtomicFPStore<0b0, 0b111, "stfminnm">; | ||
| defm STFMINNML : AtomicFPStore<0b1, 0b111, "stfminnml">; | ||
| // BFloat16 | ||
| def STBFADD : BaseAtomicFPStore<FPR16, 0b00, 0b0, 0b000, "stbfadd">; | ||
| def STBFADDL : BaseAtomicFPStore<FPR16, 0b00, 0b1, 0b000, "stbfaddl">; | ||
| def STBFMAX : BaseAtomicFPStore<FPR16, 0b00, 0b0, 0b100, "stbfmax">; | ||
| def STBFMAXL : BaseAtomicFPStore<FPR16, 0b00, 0b1, 0b100, "stbfmaxl">; | ||
| def STBFMIN : BaseAtomicFPStore<FPR16, 0b00, 0b0, 0b101, "stbfmin">; | ||
| def STBFMINL : BaseAtomicFPStore<FPR16, 0b00, 0b1, 0b101, "stbfminl">; | ||
| def STBFMAXNM : BaseAtomicFPStore<FPR16, 0b00, 0b0, 0b110, "stbfmaxnm">; | ||
| def STBFMAXNML : BaseAtomicFPStore<FPR16, 0b00, 0b1, 0b110, "stbfmaxnml">; | ||
| def STBFMINNM : BaseAtomicFPStore<FPR16, 0b00, 0b0, 0b111, "stbfminnm">; | ||
| def STBFMINNML : BaseAtomicFPStore<FPR16, 0b00, 0b1, 0b111, "stbfminnml">; | ||
| } | ||
|
|
||
| include "AArch64InstrAtomics.td" | ||
| include "AArch64SVEInstrInfo.td" | ||
| include "AArch64SMEInstrInfo.td" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| // RUN: not llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s | ||
|
|
||
| .arch armv9.6-a+lsfe | ||
| .arch armv9.6-a+nolsfe | ||
| ldfadd h0, h1, [x2] | ||
| // CHECK: error: instruction requires: lsfe | ||
| // CHECK: ldfadd h0, h1, [x2] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| // RUN: llvm-mc -triple aarch64 -o - %s 2>&1 | FileCheck %s | ||
|
|
||
| .arch armv9.6-a+lsfe | ||
| ldfadd h0, h1, [x2] | ||
| // CHECK: ldfadd h0, h1, [x2] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| // RUN: not llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s | ||
|
|
||
| .arch_extension lsfe | ||
| .arch_extension nolsfe | ||
| ldfadd h0, h1, [x2] | ||
Lukacma marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| // CHECK: ldfadd h0, h1, [x2] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| // RUN: llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s | ||
|
|
||
| .arch_extension lsfe | ||
| ldfadd h0, h1, [x2] | ||
| // CHECK: ldfadd h0, h1, [x2] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| // RUN: not llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s | ||
|
|
||
| .cpu generic+lsfe | ||
| .cpu generic+nolsfe | ||
| ldfadd h0, h1, [x2] | ||
| // CHECK: error: instruction requires: lsfe | ||
| // CHECK-NEXT: ldfadd h0, h1, [x2] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| // RUN: llvm-mc -triple aarch64 -filetype asm -o - %s 2>&1 | FileCheck %s | ||
|
|
||
| .cpu generic+lsfe | ||
| ldfadd h0, h1, [x2] | ||
| // CHECK: ldfadd h0, h1, [x2] |
Uh oh!
There was an error while loading. Please reload this page.