Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
c97259cd
Commit
c97259cd
authored
Aug 03, 2009
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x86_64 warning fixes
parent
c94dfcb8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
27 deletions
+33
-27
rts/Adjustor.c
rts/Adjustor.c
+28
-25
rts/Linker.c
rts/Linker.c
+2
-2
rts/ghc.mk
rts/ghc.mk
+3
-0
No files found.
rts/Adjustor.c
View file @
c97259cd
...
...
@@ -509,6 +509,7 @@ createAdjustor(int cconv, StgStablePtr hptr,
{
int
i
=
0
;
char
*
c
;
StgWord8
*
adj_code
;
// determine whether we have 6 or more integer arguments,
// and therefore need to flush one to the stack.
...
...
@@ -519,34 +520,36 @@ createAdjustor(int cconv, StgStablePtr hptr,
if
(
i
<
6
)
{
adjustor
=
allocateExec
(
0x30
,
&
code
);
*
(
StgInt32
*
)
adjustor
=
0x49c1894d
;
*
(
StgInt32
*
)(
adjustor
+
0x4
)
=
0x8948c889
;
*
(
StgInt32
*
)(
adjustor
+
0x8
)
=
0xf28948d1
;
*
(
StgInt32
*
)(
adjustor
+
0xc
)
=
0x48fe8948
;
*
(
StgInt32
*
)(
adjustor
+
0x10
)
=
0x000a3d8b
;
*
(
StgInt32
*
)(
adjustor
+
0x14
)
=
0x25ff0000
;
*
(
StgInt32
*
)(
adjustor
+
0x18
)
=
0x0000000c
;
*
(
StgInt64
*
)(
adjustor
+
0x20
)
=
(
StgInt64
)
hptr
;
*
(
StgInt64
*
)(
adjustor
+
0x28
)
=
(
StgInt64
)
wptr
;
adj_code
=
(
StgWord8
*
)
adjustor
;
*
(
StgInt32
*
)
adj_code
=
0x49c1894d
;
*
(
StgInt32
*
)(
adj_code
+
0x4
)
=
0x8948c889
;
*
(
StgInt32
*
)(
adj_code
+
0x8
)
=
0xf28948d1
;
*
(
StgInt32
*
)(
adj_code
+
0xc
)
=
0x48fe8948
;
*
(
StgInt32
*
)(
adj_code
+
0x10
)
=
0x000a3d8b
;
*
(
StgInt32
*
)(
adj_code
+
0x14
)
=
0x25ff0000
;
*
(
StgInt32
*
)(
adj_code
+
0x18
)
=
0x0000000c
;
*
(
StgInt64
*
)(
adj_code
+
0x20
)
=
(
StgInt64
)
hptr
;
*
(
StgInt64
*
)(
adj_code
+
0x28
)
=
(
StgInt64
)
wptr
;
}
else
{
adjustor
=
allocateExec
(
0x40
,
&
code
);
*
(
StgInt32
*
)
adjustor
=
0x35ff5141
;
*
(
StgInt32
*
)(
adjustor
+
0x4
)
=
0x00000020
;
*
(
StgInt32
*
)(
adjustor
+
0x8
)
=
0x49c1894d
;
*
(
StgInt32
*
)(
adjustor
+
0xc
)
=
0x8948c889
;
*
(
StgInt32
*
)(
adjustor
+
0x10
)
=
0xf28948d1
;
*
(
StgInt32
*
)(
adjustor
+
0x14
)
=
0x48fe8948
;
*
(
StgInt32
*
)(
adjustor
+
0x18
)
=
0x00123d8b
;
*
(
StgInt32
*
)(
adjustor
+
0x1c
)
=
0x25ff0000
;
*
(
StgInt32
*
)(
adjustor
+
0x20
)
=
0x00000014
;
adj_code
=
(
StgWord8
*
)
adjustor
;
*
(
StgInt32
*
)
adj_code
=
0x35ff5141
;
*
(
StgInt32
*
)(
adj_code
+
0x4
)
=
0x00000020
;
*
(
StgInt32
*
)(
adj_code
+
0x8
)
=
0x49c1894d
;
*
(
StgInt32
*
)(
adj_code
+
0xc
)
=
0x8948c889
;
*
(
StgInt32
*
)(
adj_code
+
0x10
)
=
0xf28948d1
;
*
(
StgInt32
*
)(
adj_code
+
0x14
)
=
0x48fe8948
;
*
(
StgInt32
*
)(
adj_code
+
0x18
)
=
0x00123d8b
;
*
(
StgInt32
*
)(
adj_code
+
0x1c
)
=
0x25ff0000
;
*
(
StgInt32
*
)(
adj_code
+
0x20
)
=
0x00000014
;
*
(
StgInt64
*
)(
adj
ustor
+
0x28
)
=
(
StgInt64
)
obscure_ccall_ret_code
;
*
(
StgInt64
*
)(
adj
ustor
+
0x30
)
=
(
StgInt64
)
hptr
;
*
(
StgInt64
*
)(
adj
ustor
+
0x38
)
=
(
StgInt64
)
wptr
;
*
(
StgInt64
*
)(
adj
_code
+
0x28
)
=
(
StgInt64
)
obscure_ccall_ret_code
;
*
(
StgInt64
*
)(
adj
_code
+
0x30
)
=
(
StgInt64
)
hptr
;
*
(
StgInt64
*
)(
adj
_code
+
0x38
)
=
(
StgInt64
)
wptr
;
}
}
#elif defined(sparc_HOST_ARCH)
...
...
@@ -1121,9 +1124,9 @@ if ( *(unsigned char*)ptr != 0xe8 ) {
freeStablePtr
(((
AdjustorStub
*
)
ptr
)
->
hptr
);
#elif defined(x86_64_HOST_ARCH)
if
(
*
(
StgWord16
*
)
ptr
==
0x894d
)
{
freeStablePtr
(
*
(
StgStablePtr
*
)(
ptr
+
0x20
));
freeStablePtr
(
*
(
StgStablePtr
*
)(
(
StgWord8
*
)
ptr
+
0x20
));
}
else
if
(
*
(
StgWord16
*
)
ptr
==
0x5141
)
{
freeStablePtr
(
*
(
StgStablePtr
*
)(
ptr
+
0x30
));
freeStablePtr
(
*
(
StgStablePtr
*
)(
(
StgWord8
*
)
ptr
+
0x30
));
}
else
{
errorBelch
(
"freeHaskellFunctionPtr: not for me, guv! %p
\n
"
,
ptr
);
return
;
...
...
rts/Linker.c
View file @
c97259cd
...
...
@@ -1292,7 +1292,7 @@ mmap_again:
#if defined(x86_64_HOST_ARCH)
if
(
mmap_32bit_base
!=
0
)
{
if
(
result
==
map_addr
)
{
mmap_32bit_base
=
map_addr
+
size
;
mmap_32bit_base
=
(
StgWord8
*
)
map_addr
+
size
;
}
else
{
if
((
W_
)
result
>
0x80000000
)
{
// oops, we were given memory over 2Gb
...
...
@@ -1310,7 +1310,7 @@ mmap_again:
// hmm, we were given memory somewhere else, but it's
// still under 2Gb so we can use it. Next time, ask
// for memory right after the place we just got some
mmap_32bit_base
=
(
void
*
)
result
+
size
;
mmap_32bit_base
=
(
StgWord8
*
)
result
+
size
;
}
}
}
else
{
...
...
rts/ghc.mk
View file @
c97259cd
...
...
@@ -251,6 +251,9 @@ sm/Storage_CC_OPTS += -Wno-strict-prototypes
# inlining warnings happen in Compact
sm/
Compact_CC_OPTS
+=
-Wno-inline
# emits warnings about call-clobbered registers on x86_64
StgCRun_CC_OPTS
+=
-w
RetainerProfile_CC_OPTS
+=
-w
RetainerSet_CC_OPTS
+=
-Wno-format
# On Windows:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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