C: fix compiler warning

This commit is contained in:
Alexey Andreev 2023-10-21 19:28:42 +02:00
parent 062e61ea3d
commit 0e2052d91c
2 changed files with 10 additions and 0 deletions

View File

@ -34,6 +34,8 @@ public class ShadowStackIntrinsic implements Intrinsic {
case "registerCallSite": case "registerCallSite":
case "getExceptionHandlerId": case "getExceptionHandlerId":
case "setExceptionHandlerId": case "setExceptionHandlerId":
case "setExceptionHandlerSkip":
case "setExceptionHandlerRestore":
case "getStackTop": case "getStackTop":
case "getNextStackFrame": case "getNextStackFrame":
case "getStackRootCount": case "getStackRootCount":
@ -69,6 +71,12 @@ public class ShadowStackIntrinsic implements Intrinsic {
case "setExceptionHandlerId": case "setExceptionHandlerId":
context.writer().print("TEAVM_SET_EXCEPTION_HANDLER"); context.writer().print("TEAVM_SET_EXCEPTION_HANDLER");
break; break;
case "setExceptionHandlerSkip":
context.writer().print("TEAVM_SET_EXCEPTION_HANDLER_SKIP");
break;
case "setExceptionHandlerRestore":
context.writer().print("TEAVM_SET_EXCEPTION_HANDLER_RESTO");
break;
case "getStackTop": case "getStackTop":
context.writer().print("teavm_stackTop"); context.writer().print("teavm_stackTop");
return; return;

View File

@ -95,6 +95,8 @@ typedef struct TeaVM_StackFrame {
#define TEAVM_WITH_CALL_SITE_ID(id, expr) (TEAVM_CALL_SITE(id), (expr)) #define TEAVM_WITH_CALL_SITE_ID(id, expr) (TEAVM_CALL_SITE(id), (expr))
#define TEAVM_EXCEPTION_HANDLER (teavm_shadowStack.header.callSiteId) #define TEAVM_EXCEPTION_HANDLER (teavm_shadowStack.header.callSiteId)
#define TEAVM_SET_EXCEPTION_HANDLER(frame, id) (((TeaVM_StackFrame*) (frame))->callSiteId = (id)) #define TEAVM_SET_EXCEPTION_HANDLER(frame, id) (((TeaVM_StackFrame*) (frame))->callSiteId = (id))
#define TEAVM_SET_EXCEPTION_HANDLER_SKIP(frame) (((TeaVM_StackFrame*) (frame))->callSiteId++)
#define TEAVM_SET_EXCEPTION_HANDLER_RESTORE(frame) (((TeaVM_StackFrame*) (frame))->callSiteId--)
#define TEAVM_GET_NEXT_FRAME(frame) (((TeaVM_StackFrame*) (frame))->next) #define TEAVM_GET_NEXT_FRAME(frame) (((TeaVM_StackFrame*) (frame))->next)
#define TEAVM_GET_CALL_SITE_ID(frame) (((TeaVM_StackFrame*) (frame))->callSiteId) #define TEAVM_GET_CALL_SITE_ID(frame) (((TeaVM_StackFrame*) (frame))->callSiteId)