Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
f9c1512a
Commit
f9c1512a
authored
Jun 29, 2006
by
Simon Marlow
Browse files
add MO_WriteBarrier to CallishMachOps
This will let us express write barriers in C--
parent
125cad87
Changes
3
Hide whitespace changes
Inline
Side-by-side
compiler/cmm/MachOp.hs
View file @
f9c1512a
...
...
@@ -385,6 +385,7 @@ data CallishMachOp
|
MO_F32_Log
|
MO_F32_Exp
|
MO_F32_Sqrt
|
MO_WriteBarrier
deriving
(
Eq
,
Show
)
pprCallishMachOp
::
CallishMachOp
->
SDoc
...
...
compiler/cmm/PprC.hs
View file @
f9c1512a
...
...
@@ -547,6 +547,7 @@ pprCallishMachOp_for_C mop
MO_F32_Log
->
ptext
SLIT
(
"logf"
)
MO_F32_Exp
->
ptext
SLIT
(
"expf"
)
MO_F32_Sqrt
->
ptext
SLIT
(
"sqrtf"
)
MO_WriteBarrier
->
ptext
SLIT
(
"write_barrier"
)
-- ---------------------------------------------------------------------
-- Useful #defines
...
...
compiler/nativeGen/MachCodeGen.hs
View file @
f9c1512a
...
...
@@ -2909,6 +2909,10 @@ genCCall fn cconv result_regs args
#
if
i386_TARGET_ARCH
genCCall
(
CmmPrim
MO_WriteBarrier
)
_
_
_
=
return
nilOL
-- write barrier compiles to no code on x86/x86-64;
-- we keep it this long in order to prevent earlier optimisations.
-- we only cope with a single result for foreign calls
genCCall
(
CmmPrim
op
)
[(
r
,
_
)]
args
vols
=
do
case
op
of
...
...
@@ -3119,6 +3123,10 @@ outOfLineFloatOp mop res args vols
#
if
x86_64_TARGET_ARCH
genCCall
(
CmmPrim
MO_WriteBarrier
)
_
_
_
=
return
nilOL
-- write barrier compiles to no code on x86/x86-64;
-- we keep it this long in order to prevent earlier optimisations.
genCCall
(
CmmPrim
op
)
[(
r
,
_
)]
args
vols
=
outOfLineFloatOp
op
r
args
vols
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment