Deletes some dead code in the TILE-Gx/TILEPro ports of gas.
* tc-tilepro.c (apply_special_operator): delete cases for got and tls operators. (md_apply_fix): Ditto. * tc-tilegx.c: (apply_special_operator): delete cases for got and tls operators. (md_apply_fix): Ditto.
This commit is contained in:
parent
412c89dd53
commit
5414dbefea
@ -1,5 +1,8 @@
|
||||
2012-02-25 Walter Lee <walt@tilera.com>
|
||||
|
||||
* tc-tilepro.c (apply_special_operator): delete cases for
|
||||
got and tls operators.
|
||||
(md_apply_fix): Ditto.
|
||||
* tc-tilegx.c (md_begin): Set architecture and machine.
|
||||
(tilegx_target_format): Handle big endian.
|
||||
(OPTION_EB): Define.
|
||||
@ -8,6 +11,9 @@
|
||||
(md_parse_option): Handle OPTION_EB and OPTION_EL.
|
||||
(md_show_usage): Add -EB and -EL.
|
||||
(md_number_to_chars): New.
|
||||
(apply_special_operator): delete cases for got and tls
|
||||
operators.
|
||||
(md_apply_fix): Ditto.
|
||||
* tc-tilegx.h (TARGET_BYTES_BIG_ENDIAN): Guard definition with
|
||||
ifndef.
|
||||
(md_number_to_chars): Delete.
|
||||
|
@ -443,41 +443,27 @@ apply_special_operator (operatorT op, offsetT num, char *file, unsigned lineno)
|
||||
|
||||
switch (op)
|
||||
{
|
||||
case O_hw0_last_tls_gd:
|
||||
case O_hw0_last_tls_ie:
|
||||
case O_hw0_last:
|
||||
check_shift = 0;
|
||||
/* Fall through. */
|
||||
case O_hw0_tls_gd:
|
||||
case O_hw0_tls_ie:
|
||||
case O_hw0:
|
||||
ret = (signed short)num;
|
||||
break;
|
||||
|
||||
case O_hw1_last_tls_gd:
|
||||
case O_hw1_last_tls_ie:
|
||||
case O_hw1_last:
|
||||
check_shift = 16;
|
||||
/* Fall through. */
|
||||
case O_hw1_tls_gd:
|
||||
case O_hw1_tls_ie:
|
||||
case O_hw1:
|
||||
ret = (signed short)(num >> 16);
|
||||
break;
|
||||
|
||||
case O_hw2_last_tls_gd:
|
||||
case O_hw2_last_tls_ie:
|
||||
case O_hw2_last:
|
||||
check_shift = 32;
|
||||
/* Fall through. */
|
||||
case O_hw2_tls_gd:
|
||||
case O_hw2_tls_ie:
|
||||
case O_hw2:
|
||||
ret = (signed short)(num >> 32);
|
||||
break;
|
||||
|
||||
case O_hw3_tls_gd:
|
||||
case O_hw3_tls_ie:
|
||||
case O_hw3:
|
||||
ret = (signed short)(num >> 48);
|
||||
break;
|
||||
@ -1554,12 +1540,6 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW0:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW0_PCREL:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW0_PCREL:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW0_GOT:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW0_GOT:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_GD:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_GD:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW0_TLS_IE:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW0_TLS_IE:
|
||||
special = O_hw0;
|
||||
break;
|
||||
|
||||
@ -1568,12 +1548,6 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_PCREL:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_PCREL:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_GOT:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_GOT:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_GD:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_GD:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW0_LAST_TLS_IE:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW0_LAST_TLS_IE:
|
||||
special = O_hw0_last;
|
||||
break;
|
||||
|
||||
@ -1582,12 +1556,6 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW1:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW1_PCREL:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW1_PCREL:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW1_GOT:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW1_GOT:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_GD:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_GD:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW1_TLS_IE:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW1_TLS_IE:
|
||||
special = O_hw1;
|
||||
break;
|
||||
|
||||
@ -1596,12 +1564,6 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_PCREL:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_PCREL:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_GOT:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_GOT:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_GD:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_GD:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW1_LAST_TLS_IE:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW1_LAST_TLS_IE:
|
||||
special = O_hw1_last;
|
||||
break;
|
||||
|
||||
@ -1610,12 +1572,6 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW2:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW2_PCREL:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW2_PCREL:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW2_GOT:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW2_GOT:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_GD:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_GD:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW2_TLS_IE:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW2_TLS_IE:
|
||||
special = O_hw2;
|
||||
break;
|
||||
|
||||
@ -1624,12 +1580,6 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_PCREL:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_PCREL:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_GOT:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_GOT:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_GD:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_GD:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW2_LAST_TLS_IE:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW2_LAST_TLS_IE:
|
||||
special = O_hw2_last;
|
||||
break;
|
||||
|
||||
@ -1638,12 +1588,6 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW3:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW3_PCREL:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW3_PCREL:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW3_GOT:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW3_GOT:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_GD:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_GD:
|
||||
case BFD_RELOC_TILEGX_IMM16_X0_HW3_TLS_IE:
|
||||
case BFD_RELOC_TILEGX_IMM16_X1_HW3_TLS_IE:
|
||||
special = O_hw3;
|
||||
break;
|
||||
|
||||
|
@ -381,24 +381,12 @@ apply_special_operator (operatorT op, int num)
|
||||
switch (op)
|
||||
{
|
||||
case O_lo16:
|
||||
case O_got:
|
||||
case O_got_lo16:
|
||||
case O_tls_gd:
|
||||
case O_tls_gd_lo16:
|
||||
case O_tls_ie:
|
||||
case O_tls_ie_lo16:
|
||||
return (signed short)num;
|
||||
|
||||
case O_hi16:
|
||||
case O_got_hi16:
|
||||
case O_tls_gd_hi16:
|
||||
case O_tls_ie_hi16:
|
||||
return (signed short)(num >> 16);
|
||||
|
||||
case O_ha16:
|
||||
case O_got_ha16:
|
||||
case O_tls_gd_ha16:
|
||||
case O_tls_ie_ha16:
|
||||
return (signed short)((num + 0x8000) >> 16);
|
||||
|
||||
default:
|
||||
@ -1343,36 +1331,6 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
|
||||
/* Apply lo16, hi16, ha16, etc. munging. */
|
||||
switch (fixP->fx_r_type)
|
||||
{
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_GOT:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_GOT:
|
||||
*valP = value = apply_special_operator (O_got, value);
|
||||
break;
|
||||
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_GOT_LO:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_GOT_LO:
|
||||
*valP = value = apply_special_operator (O_got_lo16, value);
|
||||
break;
|
||||
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_GOT_HI:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_GOT_HI:
|
||||
*valP = value = apply_special_operator (O_got_hi16, value);
|
||||
break;
|
||||
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_GOT_HA:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_GOT_HA:
|
||||
*valP = value = apply_special_operator (O_got_ha16, value);
|
||||
break;
|
||||
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD:
|
||||
*valP = value = apply_special_operator (O_tls_gd, value);
|
||||
break;
|
||||
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE:
|
||||
*valP = value = apply_special_operator (O_tls_ie, value);
|
||||
break;
|
||||
|
||||
case BFD_RELOC_LO16:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_LO:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_LO:
|
||||
@ -1381,16 +1339,6 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
|
||||
*valP = value = apply_special_operator (O_lo16, value);
|
||||
break;
|
||||
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_LO:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_LO:
|
||||
*valP = value = apply_special_operator (O_tls_gd_lo16, value);
|
||||
break;
|
||||
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_LO:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_LO:
|
||||
*valP = value = apply_special_operator (O_tls_ie_lo16, value);
|
||||
break;
|
||||
|
||||
case BFD_RELOC_HI16:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_HI:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_HI:
|
||||
@ -1399,16 +1347,6 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
|
||||
*valP = value = apply_special_operator (O_hi16, value);
|
||||
break;
|
||||
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HI:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HI:
|
||||
*valP = value = apply_special_operator (O_tls_gd_hi16, value);
|
||||
break;
|
||||
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HI:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HI:
|
||||
*valP = value = apply_special_operator (O_tls_ie_hi16, value);
|
||||
break;
|
||||
|
||||
case BFD_RELOC_HI16_S:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_HA:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_HA:
|
||||
@ -1417,16 +1355,6 @@ md_apply_fix (fixS *fixP, valueT * valP, segT seg ATTRIBUTE_UNUSED)
|
||||
*valP = value = apply_special_operator (O_ha16, value);
|
||||
break;
|
||||
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_TLS_GD_HA:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_TLS_GD_HA:
|
||||
*valP = value = apply_special_operator (O_tls_gd_ha16, value);
|
||||
break;
|
||||
|
||||
case BFD_RELOC_TILEPRO_IMM16_X0_TLS_IE_HA:
|
||||
case BFD_RELOC_TILEPRO_IMM16_X1_TLS_IE_HA:
|
||||
*valP = value = apply_special_operator (O_tls_ie_ha16, value);
|
||||
break;
|
||||
|
||||
default:
|
||||
/* Do nothing */
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user