Ticket #21 (closed defect: invalid)
double relative addressing failing in macros. (x86_64) (cvs yasm 11/15/03)
| Reported by: | phillim2@… | Owned by: | peter@… |
|---|---|---|---|
| Priority: | P2 | Milestone: | 0.4.0 |
| Component: | Architecture: x86 | Version: | other |
| Severity: | normal | Keywords: | |
| Cc: |
Description
Porting nasm code to x86_64, trying to create PIC obj you need to add wrt rip or +rip in relative addressing. A macro is being called with a static var as one of its parameters. In the macro the following is coded: movqda xmm1, [%2+16], where %2 is the passed in static var. To create PIC code for x86_64 this needs to be relative to rip. The only combination of wrt and + that even compiles is movqda xmm1, [%2+16+rip]. The created offset is *majorly* wrong. Trying to link this file into a shared lib barfs big time. Work around for the moment is to lea rax,[%2 wrt rip] and then use rax+16 in the movqda instruction.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
