Had been doing this piece by piece, but makes more sense to do it in a single PR. Adds support for `ARID`, `PCI`, `PCD`, `AL`, and `ARD` addressing modes for atomic operations, along with a variety of tests. The `CodeModel` tests have been rearranged, as some of the new addressing modes are only exercised under some combinations of `CodeModel` and relocation mode
42 lines
1.0 KiB
LLVM
42 lines
1.0 KiB
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
|
|
; RUN: llc -mtriple=m68k-linux-gnu --code-model=large < %s | FileCheck %s
|
|
; RUN: llc -mtriple=m68k-linux-gnu --code-model=large --relocation-model=pic < %s | FileCheck %s --check-prefix=PIC
|
|
|
|
; M68k's libgcc does NOT have __sync_synchronize so we shouldn't
|
|
; lower to that.
|
|
|
|
define void @atomic_fence() {
|
|
; CHECK-LABEL: atomic_fence:
|
|
; CHECK: .cfi_startproc
|
|
; CHECK-NEXT: ; %bb.0: ; %entry
|
|
; CHECK-NEXT: ;APP
|
|
; CHECK-NEXT: ;NO_APP
|
|
; CHECK-NEXT: ;APP
|
|
; CHECK-NEXT: ;NO_APP
|
|
; CHECK-NEXT: ;APP
|
|
; CHECK-NEXT: ;NO_APP
|
|
; CHECK-NEXT: ;APP
|
|
; CHECK-NEXT: ;NO_APP
|
|
; CHECK-NEXT: rts
|
|
;
|
|
; PIC-LABEL: atomic_fence:
|
|
; PIC: .cfi_startproc
|
|
; PIC-NEXT: ; %bb.0: ; %entry
|
|
; PIC-NEXT: ;APP
|
|
; PIC-NEXT: ;NO_APP
|
|
; PIC-NEXT: ;APP
|
|
; PIC-NEXT: ;NO_APP
|
|
; PIC-NEXT: ;APP
|
|
; PIC-NEXT: ;NO_APP
|
|
; PIC-NEXT: ;APP
|
|
; PIC-NEXT: ;NO_APP
|
|
; PIC-NEXT: rts
|
|
entry:
|
|
fence acquire
|
|
fence release
|
|
fence acq_rel
|
|
fence seq_cst
|
|
ret void
|
|
}
|
|
|