Ticket #133 (closed enhancement: worksforme)

Opened 3 months ago

Last modified 4 weeks ago

Cross segment loads in 64-bit, SSE assembly

Reported by: anonymous Assigned to:
Priority: P1 Milestone:
Component: Core Version: 0.6.0
Severity: normal Keywords:
Cc:

Description

This more of a question than an enhancement request. I"m developing 64-bit code. I'd like to declare a table in a .data section and do an SSE2 "movdqa" read of the table from code that's in a .text section. If I just code "movdqa sseReg, [table]", the Windows linker emits an error message saying that I must set /LARGEADDRESSAWARE:NO, which means any application using my code couldn't use the full 64-bit address space (I think). That would make my clients very unhappy. Coding "movdqa sseReg, [qword table] upsets YASM. Section 2.3.1 of the YASM manual talks about something like this, but doesn't cover SSE loads. I finally moved the table into the text segment and used rip relative addressing to access it, but this wouldn't be nice for tables that were shared across code modules. Is there a way to do this?

Attachments

Change History

02/11/08 22:35:02 changed by peter@tortall.net

You can keep the value in the .data section and use RIP-relative addressing. RIP-relative addressing works regardless of whether the target data is in the .text section or not.

[qword foo] only works in the very special case of moving to/from the accumulator (AL/AX/EAX/RAX) register. This is a limitation of the instruction set.

04/15/08 18:38:22 changed by peter@tortall.net

  • status changed from new to closed.
  • resolution set to worksforme.

Add/Change #133 (Cross segment loads in 64-bit, SSE assembly)