This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][AArch64] Fix cfi_adjust_cfa_offset usage in dl-tlsdesc.S


Some of the cfi annotations used incorrect sign.
(This is a trivial patch, but depends on the fix
for lazy TLSDESC initialization)

Changelog:

2015-04-22  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* sysdeps/aarch64/dl-tlsdesc.S (_dl_tlsdesc_return_lazy): Fix
	cfi_adjust_cfa_offset argument.
	(_dl_tlsdesc_undefweak, _dl_tlsdesc_dynamic): Likewise.
	(_dl_tlsdesc_resolve_rela, _dl_tlsdesc_resolve_hold): Likewise.
diff --git a/sysdeps/aarch64/dl-tlsdesc.S b/sysdeps/aarch64/dl-tlsdesc.S
index ff74b52..8c8fbd6 100644
--- a/sysdeps/aarch64/dl-tlsdesc.S
+++ b/sysdeps/aarch64/dl-tlsdesc.S
@@ -114,7 +114,7 @@ _dl_tlsdesc_return_lazy:
 	.align  2
 _dl_tlsdesc_undefweak:
 	str	x1, [sp, #-16]!
-	cfi_adjust_cfa_offset(16)
+	cfi_adjust_cfa_offset (16)
 	/* The ldar guarantees ordering between the load from [x0] at the
 	   call site and the load from [x0,#8] here for lazy relocation. */
 	ldar	xzr, [x0]
@@ -122,7 +122,7 @@ _dl_tlsdesc_undefweak:
 	mrs	x1, tpidr_el0
 	sub	x0, x0, x1
 	ldr	x1, [sp], #16
-	cfi_adjust_cfa_offset(16)
+	cfi_adjust_cfa_offset (-16)
 	RET
 	cfi_endproc
 	.size	_dl_tlsdesc_undefweak, .-_dl_tlsdesc_undefweak
@@ -196,7 +196,7 @@ _dl_tlsdesc_dynamic:
 	ldp	 x3,  x4, [sp, #32+16*1]
 
 	ldp	x29, x30, [sp], #(32+16*NSAVEXREGPAIRS)
-	cfi_adjust_cfa_offset (32+16*NSAVEXREGPAIRS)
+	cfi_adjust_cfa_offset (-32-16*NSAVEXREGPAIRS)
 # undef NSAVEXREGPAIRS
 	RET
 2:
@@ -285,7 +285,7 @@ _dl_tlsdesc_resolve_rela:
 	ldp	x15, x16, [sp, #32+16*6]
 	ldp	x17, x18, [sp, #32+16*7]
 	ldp	x29, x30, [sp], #(32+16*NSAVEXREGPAIRS)
-	cfi_adjust_cfa_offset (-32+16*NSAVEXREGPAIRS)
+	cfi_adjust_cfa_offset (-32-16*NSAVEXREGPAIRS)
 	ldp	x2, x3, [sp], #16
 	cfi_adjust_cfa_offset (-16)
 	RET
@@ -347,7 +347,7 @@ _dl_tlsdesc_resolve_hold:
 	ldp	x15, x16, [sp, #32+16*7]
 	ldp	x17, x18, [sp, #32+16*8]
 	ldp	x29, x30, [sp], #(32+16*NSAVEXREGPAIRS)
-	cfi_adjust_cfa_offset (-32+16*NSAVEXREGPAIRS)
+	cfi_adjust_cfa_offset (-32-16*NSAVEXREGPAIRS)
 	RET
 	cfi_endproc
 	.size	_dl_tlsdesc_resolve_hold, .-_dl_tlsdesc_resolve_hold

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]