mirror of
https://github.com/intel/linux-sgx
synced 2026-06-08 14:49:32 +00:00
4495449cea
The load_regs assembly function uses its caller's frame pointer. C/C++ compilers are allowed to make optimizations to their representation of the stack, and frequently omit the frame pointer. The functions _EEXIT in t_instructions.cpp and _SE3 in u_instructions.cpp both call load_regs, and thus should be the only ones that should be affected by deoptimization. Even -O0 may omit the frame pointer (indeed we found this to be the case when compiling with GCC 7.3.0), so this change also makes that requirement explicit by by means of -fno-omit-frame-pointer. The analogous attribute for -fno-omit-frame-pointer is not available in clang, so the clang version of the LOAD_REGS_ATTRIBUTES is simply [[clang:optnone]]. An added bonus of switching the -O0 flag over to an attribute in source code is that alternate build tools are easier to port to :) Signed-off-by: Dionna Glaze <dionnaglaze@google.com>