[llvm] r205040 - Convert llc -filetype=obj test.

Rafael Espindola rafael.espindola at gmail.com
Fri Mar 28 12:41:33 PDT 2014


Author: rafael
Date: Fri Mar 28 14:41:33 2014
New Revision: 205040

URL: http://llvm.org/viewvc/llvm-project?rev=205040&view=rev
Log:
Convert llc -filetype=obj test.

Added:
    llvm/trunk/test/MC/Mips/r-mips-got-disp.s
Removed:
    llvm/trunk/test/MC/Mips/r-mips-got-disp.ll

Removed: llvm/trunk/test/MC/Mips/r-mips-got-disp.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/r-mips-got-disp.ll?rev=205039&view=auto
==============================================================================
--- llvm/trunk/test/MC/Mips/r-mips-got-disp.ll (original)
+++ llvm/trunk/test/MC/Mips/r-mips-got-disp.ll (removed)
@@ -1,19 +0,0 @@
-; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 < %s -o - | llvm-readobj -r | FileCheck %s
-
-; Check that the R_MIPS_GOT_DISP relocations were created.
-
-; CHECK: Relocations [
-; CHECK:     0x{{[0-9,A-F]+}} R_MIPS_GOT_DISP
-
- at shl = global i64 1, align 8
- at .str = private unnamed_addr constant [8 x i8] c"0x%llx\0A\00", align 1
-
-define i32 @main() nounwind {
-entry:
-  %0 = load i64* @shl, align 8
-  %call = tail call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([8 x i8]* @.str, i64 0, i64 0), i64 %0) nounwind
-  ret i32 0
-}
-
-declare i32 @printf(i8* nocapture, ...) nounwind
-

Added: llvm/trunk/test/MC/Mips/r-mips-got-disp.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/Mips/r-mips-got-disp.s?rev=205040&view=auto
==============================================================================
--- llvm/trunk/test/MC/Mips/r-mips-got-disp.s (added)
+++ llvm/trunk/test/MC/Mips/r-mips-got-disp.s Fri Mar 28 14:41:33 2014
@@ -0,0 +1,65 @@
+// RUN: llvm-mc -triple=mips64el-pc-linux -filetype=obj -mcpu=mips64r2 < %s -o - | llvm-readobj -r | FileCheck %s
+
+// Check that the R_MIPS_GOT_DISP relocations were created.
+
+//       CHECK: Relocations [
+// CHECK:     0x{{[0-9,A-F]+}} R_MIPS_GOT_DISP
+
+	.text
+	.abicalls
+	.section	.mdebug.abi64,"", at progbits
+	.file	"<stdin>"
+	.text
+	.globl	main
+	.align	3
+	.type	main, at function
+	.set	nomips16
+	.ent	main
+main:                                   # @main
+	.frame	$sp,16,$ra
+	.mask 	0x00000000,0
+	.fmask	0x90000000,-4
+	.set	noreorder
+	.set	nomacro
+	.set	noat
+# BB#0:                                 # %entry
+	daddiu	$sp, $sp, -16
+	sd	$ra, 8($sp)             # 8-byte Folded Spill
+	sd	$gp, 0($sp)             # 8-byte Folded Spill
+	lui	$1, %hi(%neg(%gp_rel(main)))
+	daddu	$1, $1, $25
+	daddiu	$gp, $1, %lo(%neg(%gp_rel(main)))
+	ld	$1, %got_disp(shl)($gp)
+	ld	$5, 0($1)
+	ld	$1, %got_page($.str)($gp)
+	ld	$25, %call16(printf)($gp)
+	jalr	$25
+	daddiu	$4, $1, %got_ofst($.str)
+	addiu	$2, $zero, 0
+	ld	$gp, 0($sp)             # 8-byte Folded Reload
+	ld	$ra, 8($sp)             # 8-byte Folded Reload
+	jr	$ra
+	daddiu	$sp, $sp, 16
+	.set	at
+	.set	macro
+	.set	reorder
+	.end	main
+$tmp0:
+	.size	main, ($tmp0)-main
+
+	.type	shl, at object             # @shl
+	.data
+	.globl	shl
+	.align	3
+shl:
+	.8byte	1                       # 0x1
+	.size	shl, 8
+
+	.type	$.str, at object           # @.str
+	.section	.rodata.str1.1,"aMS", at progbits,1
+$.str:
+	.asciz	"0x%llx\n"
+	.size	$.str, 8
+
+
+	.text





More information about the llvm-commits mailing list