about summary refs log tree commit diff
path: root/soft-fp/op-4.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-06-30 17:36:18 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-06-30 17:36:18 +0000
commit9c37ec0b8929c57ea83230507d7742ca9a8888bc (patch)
treebbc2344014cd2b5a172faad1e04ad815c5a1c4ce /soft-fp/op-4.h
parent2125f674541eba23bfa3fffe8ccf75c2e82d468c (diff)
downloadglibc-9c37ec0b8929c57ea83230507d7742ca9a8888bc.tar.gz
glibc-9c37ec0b8929c57ea83230507d7742ca9a8888bc.tar.xz
glibc-9c37ec0b8929c57ea83230507d7742ca9a8888bc.zip
Rename soft-fp extended.h, op-common.h variables to avoid risk of shadowing.
In <https://sourceware.org/ml/libc-alpha/2013-06/msg00851.html>, I
fixed a bug caused by multiple soft-fp macros using the same variable
names, resulting in shadowing when one macro called another that used
the same variable name, with an argument involving the variable in the
outer macro.  The fix was to rename the local variables so their names
included the containing macro name, to ensure uniqueness.

I noted then that this would make sense more systematically for all
variables in any soft-fp macro.  Since then, I've used such variable
names in new soft-fp macros.  This patch now converts existing macros
in extended.h and op-common.h to use this convention.  (op-[1248].h
are intended to be converted separately.)

(Name conflicts could arise for label names as well, but because those
are function-scope in C any such conflict will give an immediate
compile error rather than a subtle bug, so there's no need for
preemptive renaming in that case.)

Tested for powerpc32 (soft-float) and mips64 that this makes no change
to the disassembly of installed shared libraries.

	* soft-fp/extended.h (FP_UNPACK_RAW_E): Rename local variables to
	include macro name.
	(FP_UNPACK_RAW_EP): Likewise.
	(FP_PACK_RAW_E): Likewise.
	(FP_PACK_RAW_EP): Likewise.
	* soft-fp/op-common.h (_FP_UNPACK_CANONICAL): Likewise.
	(_FP_ISSIGNAN): Likewise.
	(_FP_ADD_INTERNAL): Likewise.
	(_FP_FMA): Likewise.
	(_FP_CMP): Likewise.
	(_FP_SQRT): Likewise.
	(_FP_TO_INT): Likewise.
	(_FP_FROM_INT): Likewise.
	(FP_EXTEND): Likewise.
	(_FP_DIV_MEAT_N_loop): Likewise.
Diffstat (limited to 'soft-fp/op-4.h')
0 files changed, 0 insertions, 0 deletions