Skip to content
Snippets Groups Projects
Commit acdb2416 authored by Florian Weimer's avatar Florian Weimer
Browse files

libgcc: Move cfa_how into potential padding in struct frame_state_reg_info

On many architectures, there is a padding gap after the how array
member, and cfa_how can be moved there.  This reduces the size of the
struct and the amount of memory that uw_frame_state_for has to clear.

There is no measurable performance benefit from this on x86-64 (even
though the memset goes from 120 to 112 bytes), but it seems to be a
good idea to do anyway.

libgcc/

	* unwind-dw2.h (struct frame_state_reg_info): Move cfa_how member
	and reduce its size.
parent 0f481550
No related branches found
No related tags found
No related merge requests found
...@@ -50,6 +50,12 @@ typedef struct ...@@ -50,6 +50,12 @@ typedef struct
} reg[__LIBGCC_DWARF_FRAME_REGISTERS__+1]; } reg[__LIBGCC_DWARF_FRAME_REGISTERS__+1];
unsigned char how[__LIBGCC_DWARF_FRAME_REGISTERS__+1]; unsigned char how[__LIBGCC_DWARF_FRAME_REGISTERS__+1];
enum {
CFA_UNSET,
CFA_REG_OFFSET,
CFA_EXP
} cfa_how : 8;
/* Used to implement DW_CFA_remember_state. */ /* Used to implement DW_CFA_remember_state. */
struct frame_state_reg_info *prev; struct frame_state_reg_info *prev;
...@@ -58,11 +64,6 @@ typedef struct ...@@ -58,11 +64,6 @@ typedef struct
_Unwind_Sword cfa_offset; _Unwind_Sword cfa_offset;
_Unwind_Word cfa_reg; _Unwind_Word cfa_reg;
const unsigned char *cfa_exp; const unsigned char *cfa_exp;
enum {
CFA_UNSET,
CFA_REG_OFFSET,
CFA_EXP
} cfa_how;
} regs; } regs;
/* The PC described by the current frame state. */ /* The PC described by the current frame state. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment