x86_64 assembler

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

x86_64 assembler

mm-17
Hello,

How can one declare a constant of type qword with the INTEL assembler?
I am using FPC 2.2.0 and the mnemonic "dq"  stops the compilation with
the message "Error: Unrecognized opcode DQ".

Thanks,
mm
----
http://www.ellipsa.net/
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: x86_64 assembler

Jonas Maebe-2

On 04 Jun 2008, at 23:43, mm wrote:

> How can one declare a constant of type qword with the INTEL assembler?
> I am using FPC 2.2.0 and the mnemonic "dq"  stops the compilation with
> the message "Error: Unrecognized opcode DQ".

As far as I can see, that's not possible at this time.


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: x86_64 assembler

mm-17
Jonas Maebe a écrit :
>> How can one declare a constant of type qword with the INTEL assembler?
>> I am using FPC 2.2.0 and the mnemonic "dq"  stops the compilation with
>> the message "Error: Unrecognized opcode DQ".
>
> As far as I can see, that's not possible at this time.

That's what I was afraid of. Thanks anyway.

So the simplest solution is to use the ATT (GAS?) assembler.

mm
----
http://www.ellipsa.net/
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: x86_64 assembler

Tomas Hajny
On Thu, June 5, 2008 15:29, mm wrote:

> Jonas Maebe a écrit :
>>> How can one declare a constant of type qword with the INTEL assembler?
>>> I am using FPC 2.2.0 and the mnemonic "dq"  stops the compilation with
>>> the message "Error: Unrecognized opcode DQ".
>>
>> As far as I can see, that's not possible at this time.
>
> That's what I was afraid of. Thanks anyway.
>
> So the simplest solution is to use the ATT (GAS?) assembler.

Can't you just split the constant to two hexadecimal (or alphanumeric)
values put after "dd"?

Tomas


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: x86_64 assembler

mm-17
Tomas Hajny a écrit :

> On Thu, June 5, 2008 15:29, mm wrote:
>> Jonas Maebe a écrit :
>>>> How can one declare a constant of type qword with the INTEL assembler?
>>>> I am using FPC 2.2.0 and the mnemonic "dq"  stops the compilation with
>>>> the message "Error: Unrecognized opcode DQ".
>>> As far as I can see, that's not possible at this time.
>> That's what I was afraid of. Thanks anyway.
>>
>> So the simplest solution is to use the ATT (GAS?) assembler.
>
> Can't you just split the constant to two hexadecimal (or alphanumeric)
> values put after "dd"?

Unfortunately, no. I have to use it with something like

   dq  @@R0,@@R1,@@R2,@@R3

where the @@nn are labels (this is done to select the right jump at
run time).

I thought to use hexadecimal code to replace the mnemonic "dq" itself
but 1) I don't know its code and 2) I am not even sure it would work.

mm
----
http://www.ellipsat.net/

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: x86_64 assembler

Tomas Hajny
On Fri, June 6, 2008 17:19, mm wrote:

> Tomas Hajny a écrit :
>> On Thu, June 5, 2008 15:29, mm wrote:
>>> Jonas Maebe a écrit :
>>>>> How can one declare a constant of type qword with the INTEL
>>>>> assembler?
>>>>> I am using FPC 2.2.0 and the mnemonic "dq"  stops the compilation
>>>>> with
>>>>> the message "Error: Unrecognized opcode DQ".
>>>> As far as I can see, that's not possible at this time.
>>> That's what I was afraid of. Thanks anyway.
>>>
>>> So the simplest solution is to use the ATT (GAS?) assembler.
>>
>> Can't you just split the constant to two hexadecimal (or alphanumeric)
>> values put after "dd"?
>
> Unfortunately, no. I have to use it with something like
>
>    dq  @@R0,@@R1,@@R2,@@R3
>
> where the @@nn are labels (this is done to select the right jump at
> run time).
>
> I thought to use hexadecimal code to replace the mnemonic "dq" itself
> but 1) I don't know its code and 2) I am not even sure it would work.

There's no hexadecimal code for 'dq' (or any other d?) - this directive
simply tells the assembler that the following constants shall be put
directly into the code (instead of being compiled into some CPU
instructions)...

I suggest that you add this issue as a request to our bug tracker so that
it doesn't get forgotten (I believe that adding it shouldn't be a problem
for somebody knowing the related part of FPC).

Tomas


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: x86_64 assembler

mjm-4
Tomas Hajny a écrit :

> On Fri, June 6, 2008 17:19, mm wrote:
>> I thought to use hexadecimal code to replace the mnemonic "dq" itself
>> but 1) I don't know its code and 2) I am not even sure it would work.
>
> There's no hexadecimal code for 'dq' (or any other d?) - this directive
> simply tells the assembler that the following constants shall be put
> directly into the code (instead of being compiled into some CPU
> instructions)...
>
> I suggest that you add this issue as a request to our bug tracker so that
> it doesn't get forgotten (I believe that adding it shouldn't be a problem
> for somebody knowing the related part of FPC).

That's done.

mm
----
http://www.ellipsa.net/
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: x86_64 assembler

mm-17
In reply to this post by Tomas Hajny
Tomas Hajny a écrit :

> On Fri, June 6, 2008 17:19, mm wrote:
>> I thought to use hexadecimal code to replace the mnemonic "dq" itself
>> but 1) I don't know its code and 2) I am not even sure it would work.
>
> There's no hexadecimal code for 'dq' (or any other d?) - this directive
> simply tells the assembler that the following constants shall be put
> directly into the code (instead of being compiled into some CPU
> instructions)...
>
> I suggest that you add this issue as a request to our bug tracker so that
> it doesn't get forgotten (I believe that adding it shouldn't be a problem
> for somebody knowing the related part of FPC).

That's done.

mm
----
http://www.ellipsa.net/
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal