summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndu Bhagat <indu.bhagat@oracle.com>2022-12-09 10:25:14 -0800
committerIndu Bhagat <indu.bhagat@oracle.com>2022-12-09 10:25:14 -0800
commit989aabcb564dccc7804f174fc582b0639357a9bb (patch)
tree0601a91e7efe876b93b4055cd3ca6691ad2ee1ec /include
parentsframe: gas: libsframe: define constants and remove magic numbers (diff)
downloadbinutils-gdb-989aabcb564dccc7804f174fc582b0639357a9bb.tar.gz
binutils-gdb-989aabcb564dccc7804f174fc582b0639357a9bb.tar.bz2
binutils-gdb-989aabcb564dccc7804f174fc582b0639357a9bb.zip
gas: sframe: fine tune the fragment fixup for SFrame func info
SFrame function info is an unsigned 8-bit field comprising of the following (from LSB to MSB): - 4-bits: FRE type - 1-bit: FRE start address encoding - 3-bits: Unused At the moment, the most-significat 4-bits are zero (The FRE start address encoding of SFRAME_FDE_TYPE_PCINC has a value of zero, and the upper 3-bits are unused). So the current implementation works without this patch. To be precise, however, the fragment fixup logic is meant to fixup only the least-significant 4-bits (i.e., only the FRE type needs to be updated according to the function size). This patch makes the gas implementation a bit more resilient: In the future, when the format does evolve to make use of the currently unused 3-bits in various ways, the values in those 3-bits can be propagated unchanged while the fragment fixup continues to update the lowermost 4-bits to indicate the selected FRE type. ChangeLog: * gas/gen-sframe.c (create_func_info_exp): New definition. (output_sframe_funcdesc): Call create_func_info_exp. * gas/sframe-opt.c (sframe_estimate_size_before_relax): The associated fragment uses O_modulus now. (sframe_convert_frag): Adjust the fragment fixup code according to the new composite exp.
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions