Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2005-08

error msg: "Selected asm reader not supported"

9 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bartek

hi

Using the current compiler from svn, i get the following message when trying to compile "tcl80.pas". This also happens when i try to compile other code using asm code.

[...]\tcl80.pp(1023,6) Fatal: Selected assembler reader not supported

thanks for your help in advance.

bartek

Reply by email

Marco van de Voort
to Bartek
Show quoted text 7 lines
Using the current compiler from svn, i get the following message when trying to compile "tcl80.pas". This also happens when i try to compile other code using asm code. [...]\tcl80.pp(1023,6) Fatal: Selected assembler reader not supported thanks for your help in advance.

This error is typical of code that is designed for x86. You are probably compiling for a different target, e.g. AMD64 or Powerpc. The code needs to be fixed for that.

Reply by email

Bartek
to Marco van de Voort
Marco van de Voort wrote 16 lines
>Using the current compiler from svn, i get the following message when >trying to compile "tcl80.pas". This also happens when i try to compile >other code using asm code. > >[...]\tcl80.pp(1023,6) Fatal: Selected assembler reader not supported > >thanks for your help in advance. > > This error is typical of code that is designed for x86. You are probably compiling for a different target, e.g. AMD64 or Powerpc. The code needs to be fixed for that.

I am compiling my sources under win32 for win32 with Lazarus. And my source codes and the "tcl80.pas" has compiled fine with earlier versions of fpc. I only updated the fpc source from svn, compiled it, copied over the existing in Lazarus, and rebuild Lazarus.

Reply by email

Jonas Maebe
to Bartek
Bartek wrote
I am compiling my sources under win32 for win32 with Lazarus. And my source codes and the "tcl80.pas" has compiled fine with earlier versions of fpc. I only updated the fpc source from svn, compiled it, copied over the existing in Lazarus, and rebuild Lazarus.

Maybe it uses the "direct" assembler reader (which is basically "text substitution" and is incompatible with the binary object writer). Change it to use the AT&T assembler reader instead.

Jonas

Reply by email

Bartek
to Jonas Maebe
Jonas Maebe wrote 14 lines
On 7 aug 2005, at 21:29, Bartek wrote: > I am compiling my sources under win32 for win32 with Lazarus. > And my source codes and the "tcl80.pas" has compiled fine with > earlier versions of fpc. I only updated the fpc source from svn, > compiled it, copied over the existing in Lazarus, and rebuild Lazarus. Maybe it uses the "direct" assembler reader (which is basically "text substitution" and is incompatible with the binary object writer). Change it to use the AT&T assembler reader instead.

But when you look at the "tcl80.pas" source the {$ASMMODE} switch is defined. Anyway i told Lazarus to use the Intel style asm syntax. The problem is that i only updated the version of the fpc compiler. I didn't change any settings like the compiler settings, which worked fine for my sources and the tcl header. Therefore i am very surprised that this doesn't work anymore.

[...]
{$ifdef i386}
  {$ASMMODE INTEL}
{$endif i386}
[...]
Show quoted text 7 lines
Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Vincent Snijders
to Bartek
Bartek wrote 32 lines
Jonas Maebe wrote: > > On 7 aug 2005, at 21:29, Bartek wrote: > >> I am compiling my sources under win32 for win32 with Lazarus. >> And my source codes and the "tcl80.pas" has compiled fine with >> earlier versions of fpc. I only updated the fpc source from svn, >> compiled it, copied over the existing in Lazarus, and rebuild Lazarus. > > > > Maybe it uses the "direct" assembler reader (which is basically "text > substitution" and is incompatible with the binary object writer). > Change it to use the AT&T assembler reader instead. > > But when you look at the "tcl80.pas" source the {$ASMMODE} switch is defined. Anyway i told Lazarus to use the Intel style asm syntax. The problem is that i only updated the version of the fpc compiler. I didn't change any settings like the compiler settings, which worked fine for my sources and the tcl header. Therefore i am very surprised that this doesn't work anymore. [...] {$ifdef i386} {$ASMMODE INTEL} {$endif i386} [...]

Florian changed this yesterday to {$ifdef cpu386}

Vincent.

Reply by email

Bartek
to Vincent Snijders
Vincent Snijders wrote 36 lines
Bartek wrote: > > > Jonas Maebe wrote: > >> >> On 7 aug 2005, at 21:29, Bartek wrote: >> >>> I am compiling my sources under win32 for win32 with Lazarus. >>> And my source codes and the "tcl80.pas" has compiled fine with >>> earlier versions of fpc. I only updated the fpc source from svn, >>> compiled it, copied over the existing in Lazarus, and rebuild Lazarus. >> >> >> >> >> Maybe it uses the "direct" assembler reader (which is basically >> "text substitution" and is incompatible with the binary object >> writer). Change it to use the AT&T assembler reader instead. >> >> > But when you look at the "tcl80.pas" source the {$ASMMODE} switch is > defined. Anyway i told Lazarus to use the Intel style asm syntax. The > problem is that i only updated the version of the fpc compiler. I > didn't change any settings like the compiler settings, which worked > fine for my sources and the tcl header. Therefore i am very > surprised that this doesn't work anymore. > > [...] > {$ifdef i386} > {$ASMMODE INTEL} > {$endif i386} > [...] >

Thanks, now it works ;) . But now i get an "[...] Error: Invalid combination of opcode and operands" when compiling this piece of my code:

{$asmmode Intel}
[...]
operator * (s1: single; v1 :vector4) v_r:vector4;assembler; asm
movups xmm0, [v1]
movups xmm1, [s1]
shufps xmm1, xmm1, 00000000b
mulps xmm0, xmm1
movups [v_r], xmm0
end;
[...]

1. This worked fine before updating.
2. I am quite sure that the "combination of opcodes and operands" IS valid.

Reply by email

Florian Klaempfl
to Bartek
Bartek wrote 57 lines
Vincent Snijders wrote: > Bartek wrote: > >> >> >> Jonas Maebe wrote: >> >>> >>> On 7 aug 2005, at 21:29, Bartek wrote: >>> >>>> I am compiling my sources under win32 for win32 with Lazarus. >>>> And my source codes and the "tcl80.pas" has compiled fine with >>>> earlier versions of fpc. I only updated the fpc source from svn, >>>> compiled it, copied over the existing in Lazarus, and rebuild Lazarus. >>> >>> >>> >>> >>> >>> Maybe it uses the "direct" assembler reader (which is basically >>> "text substitution" and is incompatible with the binary object >>> writer). Change it to use the AT&T assembler reader instead. >>> >>> >> But when you look at the "tcl80.pas" source the {$ASMMODE} switch is >> defined. Anyway i told Lazarus to use the Intel style asm syntax. The >> problem is that i only updated the version of the fpc compiler. I >> didn't change any settings like the compiler settings, which worked >> fine for my sources and the tcl header. Therefore i am very >> surprised that this doesn't work anymore. >> >> [...] >> {$ifdef i386} >> {$ASMMODE INTEL} >> {$endif i386} >> [...] >> > Thanks, now it works ;) . But now i get an "[...] Error: Invalid combination of opcode and operands" when compiling this piece of my code: {$asmmode Intel} [...] operator * (s1: single; v1 :vector4) v_r:vector4;assembler; asm movups xmm0, [v1] movups xmm1, [s1] shufps xmm1, xmm1, 00000000b mulps xmm0, xmm1 movups [v_r], xmm0 end; [...] 1. This worked fine before updating.

Newer compilers are more strict regarding this and require a size modifier for the memory operands.

Show quoted text 8 lines
2. I am quite sure that the "combination of opcodes and operands" IS valid. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Bartek
to Florian Klaempfl
Florian Klaempfl wrote 69 lines
Bartek wrote: >Vincent Snijders wrote: > > > >>Bartek wrote: >> >> >> >>>Jonas Maebe wrote: >>> >>> >>> >>>>On 7 aug 2005, at 21:29, Bartek wrote: >>>> >>>> >>>> >>>>>I am compiling my sources under win32 for win32 with Lazarus. >>>>>And my source codes and the "tcl80.pas" has compiled fine with >>>>>earlier versions of fpc. I only updated the fpc source from svn, >>>>>compiled it, copied over the existing in Lazarus, and rebuild Lazarus. >>>>> >>>>> >>>> >>>> >>>> >>>>Maybe it uses the "direct" assembler reader (which is basically >>>>"text substitution" and is incompatible with the binary object >>>>writer). Change it to use the AT&T assembler reader instead. >>>> >>>> >>>> >>>> >>>But when you look at the "tcl80.pas" source the {$ASMMODE} switch is >>>defined. Anyway i told Lazarus to use the Intel style asm syntax. The >>>problem is that i only updated the version of the fpc compiler. I >>>didn't change any settings like the compiler settings, which worked >>>fine for my sources and the tcl header. Therefore i am very >>>surprised that this doesn't work anymore. >>> >>>[...] >>>{$ifdef i386} >>> {$ASMMODE INTEL} >>>{$endif i386} >>>[...] >>> >>> >>> >Thanks, now it works ;) . But now i get an "[...] Error: Invalid >combination of opcode and operands" when compiling this piece of my code: > >{$asmmode Intel} >[...] >operator * (s1: single; v1 :vector4) v_r:vector4;assembler; >asm >movups xmm0, [v1] >movups xmm1, [s1] >shufps xmm1, xmm1, 00000000b >mulps xmm0, xmm1 >movups [v_r], xmm0 >end; >[...] > >1. This worked fine before updating. > >

Sorry, I forgot to mention where the error happens.

{$asmmode Intel}
[...]
operator * (s1: single; v1 :vector4) v_r:vector4;assembler; asm
movups xmm0, [v1]
movups xmm1, [s1]
-> shufps xmm1, xmm1, (here)|00000000b
mulps xmm0, xmm1
movups [v_r], xmm0
end;
[...]

There aren't any memory operands.

"Newer compilers are more strict regarding this and require a size modifier for the memory operands." But the current fpc didn't complain about the previous instructions?!

Reply by email