Add OpSize16 bit, for instructions which need 0x66 prefix in 16-bit mode
[oota-llvm.git] / test / MC / Mips / xgot.ll
index bfe9b9ad6604cf1880f16ebaaa5136621e698a7e..cc336788aa85e9cb004520c76e8b685d51d3be3f 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mxgot %s -o - | elf-dump --dump-section-data  | FileCheck %s
+; RUN: llc -filetype=obj -mtriple mipsel-unknown-linux -mxgot %s -o - | llvm-readobj -r | FileCheck %s
 
 @.str = private unnamed_addr constant [16 x i8] c"ext_1=%d, i=%d\0A\00", align 1
 @ext_1 = external global i32
@@ -9,29 +9,16 @@ entry:
 ; Check that the appropriate relocations were created. 
 ; For the xgot case we want to see R_MIPS_[GOT|CALL]_[HI|LO]16.
 
-; R_MIPS_HI16
-; CHECK:     ('r_type', 0x05)
-
-; R_MIPS_LO16
-; CHECK:     ('r_type', 0x06)
-
-; R_MIPS_GOT_HI16
-; CHECK:     ('r_type', 0x16)
-
-; R_MIPS_GOT_LO16
-; CHECK:     ('r_type', 0x17)
-
-; R_MIPS_GOT
-; CHECK:     ('r_type', 0x09)
-
-; R_MIPS_LO16
-; CHECK:     ('r_type', 0x06)
-
-; R_MIPS_CALL_HI16
-; CHECK:     ('r_type', 0x1e)
-
-; R_MIPS_CALL_LO16
-; CHECK:     ('r_type', 0x1f)
+; CHECK: Relocations [
+; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_HI16
+; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_LO16
+; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_GOT_HI16
+; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_GOT_LO16
+; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_CALL_HI16
+; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_CALL_LO16
+; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_GOT
+; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_LO16
+; CHECK: ]
 
   %0 = load i32* @ext_1, align 4
   %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([16 x i8]* @.str, i32 0, i32 0), i32 %0) nounwind