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;
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;
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;
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;
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;
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;
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;
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;
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:
/* 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:
*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:
*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:
*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;