Sign in Join

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

Mailing lists / fpc-other / 2008-04

Coding for multiple targets/instruction sets get confusing, yes or no ?

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Skybuck Flying

Hello,

I have a question for the developers of free pascal compiler:

I see free pascal compiler supports multiple targets like IA32 and PowerPC, so I have little question about that:

First of all, are the same programmers writing code to support both targets ?

If so then my question becomes:

Do you ever get confused because you have to learn two targets/instruction sets ???????

Bye,
Skybuck.

Florian Klaempfl
to Skybuck Flying
Show quoted text 9 lines
Hello, I have a question for the developers of free pascal compiler: I see free pascal compiler supports multiple targets like IA32 and PowerPC, so I have little question about that: First of all, are the same programmers writing code to support both targets ?

Yes, though not everybody is writing code for all cpus but a certain subset.

Show quoted text 5 lines
If so then my question becomes: Do you ever get confused because you have to learn two targets/instruction sets ???????

Yes. However, you've only to realize that you're confused and then you ask the manuals.

Alain Michaud
to Florian Klaempfl

Hi,

here is a simple stupid question for experienced programmers:

When using the inline assembler instructions (asm), one can chose the "intel" or "ATT" syntax. Which one is the best, more convenient?

Thank you

Alain

Tomas Hajny
to Alain Michaud
Alain Michaud wrote 6 lines
Hi, here is a simple stupid question for experienced programmers: When using the inline assembler instructions (asm), one can chose the "intel" or "ATT" syntax. Which one is the best, more convenient?

Trying to focus on objective factors (without any ranking - you need to decide on their weight for you):

- AT&T syntax is available on more platforms as far as I know.

- AT&T syntax is more explicit on e.g. size of operands (you sometimes need to guess that from context with Intel syntax).

- Intel syntax may be better alternative if you need to consider interoperability with e.g. Delphi or some other Pascal compilers on x86 platform.

- Considering that majority of Pascal programmers these days have some background with either TP/BP, Delphi or one of their clones (and these usually only support Intel syntax), there are probably more Pascal programmers who understand / prefer Intel syntax.

- If specifically targetting x86 platforms, I believe that there's more documentation available for Intel syntax too (including reference and optimization documents directly from CPU producers).

Tomas

Alain Michaud
to Tomas Hajny

so Intel it is...

Thank you so much!

Alain

Tomas Hajny wrote 35 lines
On Wed, April 16, 2008 20:00, Alain Michaud wrote: > Hi, > > here is a simple stupid question for experienced programmers: > > When using the inline assembler instructions (asm), one can chose the > "intel" or "ATT" syntax. Which one is the best, more convenient? Trying to focus on objective factors (without any ranking - you need to decide on their weight for you): - AT&T syntax is available on more platforms as far as I know. - AT&T syntax is more explicit on e.g. size of operands (you sometimes need to guess that from context with Intel syntax). - Intel syntax may be better alternative if you need to consider interoperability with e.g. Delphi or some other Pascal compilers on x86 platform. - Considering that majority of Pascal programmers these days have some background with either TP/BP, Delphi or one of their clones (and these usually only support Intel syntax), there are probably more Pascal programmers who understand / prefer Intel syntax. - If specifically targetting x86 platforms, I believe that there's more documentation available for Intel syntax too (including reference and optimization documents directly from CPU producers). Tomas _______________________________________________ fpc-other maillist - http://lists.freepascal.org/mailman/listinfo/fpc-other