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
jberryman
GHC
Commits
3cdcc0b5
Commit
3cdcc0b5
authored
Feb 11, 2019
by
Artem Pyanykh
Committed by
Marge Bot
Mar 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a linker test re: section alignment
parent
7bbfb789
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
0 deletions
+28
-0
testsuite/tests/rts/linker/Makefile
testsuite/tests/rts/linker/Makefile
+5
-0
testsuite/tests/rts/linker/aligned_mem_access.c
testsuite/tests/rts/linker/aligned_mem_access.c
+14
-0
testsuite/tests/rts/linker/aligned_mem_access.stdout
testsuite/tests/rts/linker/aligned_mem_access.stdout
+2
-0
testsuite/tests/rts/linker/all.T
testsuite/tests/rts/linker/all.T
+7
-0
No files found.
testsuite/tests/rts/linker/Makefile
View file @
3cdcc0b5
...
@@ -6,3 +6,8 @@ unsigned_reloc_macho_x64:
...
@@ -6,3 +6,8 @@ unsigned_reloc_macho_x64:
as
-o
unsigned_reloc_macho_x64.o unsigned_reloc_macho_x64.s
as
-o
unsigned_reloc_macho_x64.o unsigned_reloc_macho_x64.s
'
$(TEST_HC)
'
$(TEST_HC_OPTS_NO_RTSOPTS)
-v0
--make
-no-rtsopts-suggestions
-no-hs-main
-o
runner runner.c
'
$(TEST_HC)
'
$(TEST_HC_OPTS_NO_RTSOPTS)
-v0
--make
-no-rtsopts-suggestions
-no-hs-main
-o
runner runner.c
./runner unsigned_reloc_macho_x64.o getAnswer
./runner unsigned_reloc_macho_x64.o getAnswer
aligned_mem_access
:
cc
-c
-o
aligned_mem_access.o aligned_mem_access.c
'
$(TEST_HC)
'
$(TEST_HC_OPTS_NO_RTSOPTS)
-v0
--make
-no-rtsopts-suggestions
-no-hs-main
-o
runner runner.c
./runner aligned_mem_access.o foo
testsuite/tests/rts/linker/aligned_mem_access.c
0 → 100644
View file @
3cdcc0b5
#include <stdio.h>
#include <immintrin.h>
__m128
mvec
=
{
1
.
0
,
2
.
0
,
3
.
0
,
42
.
0
};
float
fvec
[]
=
{.
0
,
.
0
,
.
0
,
.
0
};
/* Uses movaps instruction to move data between XMMn <-> mem. Fails
* with segfault when data section is not properly aligned (16 byte).
*/
long
foo
(
void
)
{
_mm_store_ps
(
fvec
,
mvec
);
return
(
long
)
fvec
[
3
];
}
testsuite/tests/rts/linker/aligned_mem_access.stdout
0 → 100644
View file @
3cdcc0b5
Linking: path = aligned_mem_access.o, symname = _foo
42
\ No newline at end of file
testsuite/tests/rts/linker/all.T
View file @
3cdcc0b5
...
@@ -7,3 +7,10 @@ test('unsigned_reloc_macho_x64',
...
@@ -7,3 +7,10 @@ test('unsigned_reloc_macho_x64',
unless
(
arch
('
x86_64
'),
skip
)
unless
(
arch
('
x86_64
'),
skip
)
],
],
run_command
,
['
$MAKE -s --no-print-directory unsigned_reloc_macho_x64
'])
run_command
,
['
$MAKE -s --no-print-directory unsigned_reloc_macho_x64
'])
test
('
aligned_mem_access
',
[
extra_files
(['
runner.c
',
'
aligned_mem_access.c
']),
unless
(
opsys
('
darwin
')
and
arch
('
x86_64
'),
expect_broken
(
13624
))
],
run_command
,
['
$MAKE -s --no-print-directory aligned_mem_access
'])
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