From 5697bf26a86c34bfad8f4b9f454813b105842d2c Mon Sep 17 00:00:00 2001 From: Nicholas Mosier Date: Thu, 21 Sep 2023 04:29:05 +0000 Subject: [PATCH] arch-x86: make popx87 micro-op actually pop st(0) The popx87 micro-op did not in fact pop the st(0) floating-point register off the stack; it acted as a no-op. This patch fixes the bug by passing the spm=1 argument to PopX87's superclass to indicate the floating-point stack pointer should be incremented. GitHub issue: https://github.com/gem5/gem5/issues/344 Change-Id: I6e731882b6bcf8f0e06ebd2f66f673bf9da80717 --- src/arch/x86/isa/microops/fpop.isa | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/arch/x86/isa/microops/fpop.isa b/src/arch/x86/isa/microops/fpop.isa index 5365c587ec..b0b925f679 100644 --- a/src/arch/x86/isa/microops/fpop.isa +++ b/src/arch/x86/isa/microops/fpop.isa @@ -430,4 +430,6 @@ let {{ class Pop87(Fp0Op): code = '' op_class = 'IntAluOp' + def __init__(self): + super().__init__(spm=1) }};