[Git][ghc/ghc][wip/andreask/interpreter_primops] 2 commits: reenable subwords
Andreas Klebinger (@AndreasK)
gitlab at gitlab.haskell.org
Tue Feb 25 12:07:50 UTC 2025
Andreas Klebinger pushed to branch wip/andreask/interpreter_primops at Glasgow Haskell Compiler / GHC
Commits:
089c63ea by Andreas Klebinger at 2025-02-25T12:35:47+01:00
reenable subwords
- - - - -
41bd509c by Andreas Klebinger at 2025-02-25T12:44:26+01:00
Fix unary ops
- - - - -
2 changed files:
- compiler/GHC/StgToByteCode.hs
- rts/Interpreter.c
Changes:
=====================================
compiler/GHC/StgToByteCode.hs
=====================================
@@ -843,18 +843,19 @@ doPrimOp op init_d s p args =
Int64AddOp -> primOp OP_ADD
WordAddOp -> primOp OP_ADD
Word64AddOp -> primOp OP_ADD
+ AddrAddOp -> primOp OP_ADD
IntSubOp -> primOp OP_SUB
WordSubOp -> primOp OP_SUB
Int64SubOp -> primOp OP_SUB
Word64SubOp -> primOp OP_SUB
- -- Int8SubOp -> primOp (OP_SIZED_SUB primArg1Width)
- -- Word8SubOp -> primOp (OP_SIZED_SUB primArg1Width)
- -- Int16SubOp -> primOp (OP_SIZED_SUB primArg1Width)
- -- Word16SubOp -> primOp (OP_SIZED_SUB primArg1Width)
- -- Int32SubOp -> primOp (OP_SIZED_SUB primArg1Width)
- -- Word32SubOp -> primOp (OP_SIZED_SUB primArg1Width)
+ Int8SubOp -> primOp (OP_SIZED_SUB primArg1Width)
+ Word8SubOp -> primOp (OP_SIZED_SUB primArg1Width)
+ Int16SubOp -> primOp (OP_SIZED_SUB primArg1Width)
+ Word16SubOp -> primOp (OP_SIZED_SUB primArg1Width)
+ Int32SubOp -> primOp (OP_SIZED_SUB primArg1Width)
+ Word32SubOp -> primOp (OP_SIZED_SUB primArg1Width)
IntAndOp -> primOp OP_AND
WordAndOp -> primOp OP_AND
@@ -912,7 +913,7 @@ doPrimOp op init_d s p args =
_ -> Nothing
where
- --primArg1Width = (stgArgRepU $ head args) :: PrimRep
+ primArg1Width = (stgArgRepU $ head args) :: PrimRep
-- Push args, execute primop, slide, return_N
primOp op_inst = Just $ do
platform <- profilePlatform <$> getProfile
=====================================
rts/Interpreter.c
=====================================
@@ -2143,7 +2143,7 @@ run_BCO:
#define UN_SIZED_OP(op,ty) \
{ \
- ty r = op (*(ty*) Sp_plusB(sizeof(ty))); \
+ ty r = op (*(ty*) Sp_plusB(0)); \
if(sizeof(ty) > sizeof(StgWord)) { \
/* 64bit op on 32bit platforms */ \
SpW64(0) = (StgWord64) r; \
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a10aa396d536e587650f0160b8db2133eeecc243...41bd509c6e648b02e77a6c4447585f483a3f3611
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a10aa396d536e587650f0160b8db2133eeecc243...41bd509c6e648b02e77a6c4447585f483a3f3611
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20250225/bfd624a6/attachment-0001.html>
More information about the ghc-commits
mailing list