Sign in Join

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

Mailing lists / fpc-pascal / 2006-04

alignment

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Пётр Косаревский

Win32, i386.

In FPC 2.0.3 -Oa option is described as "<type>=<values>". This is hard to understand. What should -Oa=16 mean? Probably, it could be better decribed.

(If I get it right, the "type" means code or data, and values are not alignment values for individual types. Even if so, I didn't understand what does it mean.)

There are assembler directives ".balign 16" for some types in .data or .bss sections (with -Oa=16). Code is aligned with ".balign 4" where it's useful.

Jonas Maebe
to Пётр Косаревский
Пётр Косаревский wrote
Win32, i386. In FPC 2.0.3 -Oa option is described as "<type>=<values>". This is hard to understand. What should -Oa=16 mean?

Nothing, since you are not giving a type.

Probably, it could be better decribed.

The valid keywords are indeed not yet documented. Here are the possibilities (copy/paste from the compiler source):

           else if tok='JUMP' then
            b.jumpalign:=l
           else if tok='LOOP' then
            b.loopalign:=l
           else if tok='CONSTMIN' then
            b.constalignmin:=l
           else if tok='CONSTMAX' then
            b.constalignmax:=l
           else if tok='VARMIN' then
            b.varalignmin:=l
           else if tok='VARMAX' then
            b.varalignmax:=l
           else if tok='LOCALMIN' then
            b.localalignmin:=l
           else if tok='LOCALMAX' then
            b.localalignmax:=l
           else if tok='RECORDMIN' then
            b.recordalignmin:=l
           else if tok='RECORDMAX' then
            b.recordalignmax:=l

Jonas

Jonas Maebe
to Jonas Maebe
Jonas Maebe wrote
The valid keywords are indeed not yet documented. Here are the possibilities (copy/paste from the compiler source):

Forgot one:

           if tok='PROC' then
            b.procalign:=l
Show quoted text 20 lines
else if tok='JUMP' then b.jumpalign:=l else if tok='LOOP' then b.loopalign:=l else if tok='CONSTMIN' then b.constalignmin:=l else if tok='CONSTMAX' then b.constalignmax:=l else if tok='VARMIN' then b.varalignmin:=l else if tok='VARMAX' then b.varalignmax:=l else if tok='LOCALMIN' then b.localalignmin:=l else if tok='LOCALMAX' then b.localalignmax:=l else if tok='RECORDMIN' then b.recordalignmin:=l else if tok='RECORDMAX' then b.recordalignmax:=l

Jonas