← Back to index
|
Original Bugzilla link
Bug 16045 – Unable to loading global variables in inline assembly with -fPIC
Status
NEW
Severity
enhancement
Priority
P5
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2016-05-19T13:22:32Z
Last change time
2024-12-13T18:47:50Z
Keywords
iasm
Assigned to
No Owner
Creator
ponce
Moved to GitHub: dmd#19126 →
Comments
Comment #0
by aliloko — 2016-05-19T13:22:32Z
Consider the following source file `asm_pic.d`: align(16) static immutable short[8] A = [ 1, 1, 1, 1, 3, 3, 3, 3 ]; void main() { asm { pmullw XMM0, A; } } LDC 1.0.0-b1 thinks it's compatible with PIC code. ```bash $ ldc2 asm_pic.d # ok $ ldc2 -relocation-model=pic asm_pic.d # ok ``` DMD disallows to load the constant in PIC code. $ dmd asm_pic.d # ok $ dmd -fPIC asm_pic.d # fail asm_pic.d(7): Error: cannot directly load global variable 'A' with PIC code
Comment #1
by aliloko — 2023-12-17T15:10:17Z
Well I don't have that issue anymore.
Comment #2
by robert.schadek — 2024-12-13T18:47:50Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/dmd/issues/19126
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB