From 1eed5f511d50c3f75faa99a4070326239fcb20eb Mon Sep 17 00:00:00 2001 From: "Chloe M." Date: Tue, 14 Jul 2026 22:10:54 +0000 Subject: [PATCH] ptos/amd64: frame: Push trapframe *after* swapgs Signed-off-by: Chloe M. --- service/ptos/head/arch/amd64/frameasm.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/service/ptos/head/arch/amd64/frameasm.h b/service/ptos/head/arch/amd64/frameasm.h index d747c77..5ff5d6d 100644 --- a/service/ptos/head/arch/amd64/frameasm.h +++ b/service/ptos/head/arch/amd64/frameasm.h @@ -73,13 +73,12 @@ */ #define INTR_ENTRY(VEC) ;\ cld ;\ - push $0 ;\ - _TRAP_PUSHALL(VEC) ;\ testb $3, 8(%rsp) ;\ jz 1f ;\ lfence ;\ swapgs ;\ -1: +1: push $0 ;\ + _TRAP_PUSHALL(VEC) ;\ /* * Interrupt exit macro used when there is no error code