1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/MC/X86/pr37425.s
Nirav Dave 11c9c5b2e9 [MC][X86] Enhance X86 Register expression handling to more closely match GCC.
Allow the comparison of x86 registers in the evaluation of assembler
directives. This generalizes and simplifies the extension from r334022
to catch another case found in the Linux kernel.

Reviewers: rnk, void

Reviewed By: rnk

Subscribers: hiraditya, nickdesaulniers, llvm-commits

Differential Revision: https://reviews.llvm.org/D50795

llvm-svn: 339895
2018-08-16 16:31:14 +00:00

21 lines
319 B
ArmAsm

// RUN: llvm-mc -triple x86_64-unknown-unknown %s -o - | FileCheck %s
// CHECK-NOT: .set var_xdata
var_xdata = %rcx
// CHECK: xorq %rcx, %rcx
xorq var_xdata, var_xdata
// CHECK: .data
// CHECK-NEXT: .byte 1
.data
.if var_xdata == %rax
.byte 0
.elseif var_xdata == %rcx
.byte 1
.else
.byte 2
.endif