Sign in Join

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

Mailing lists / fpc-devel / 2023-11

Record representation clauses

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Unknown author

Hello,
I am currently working on defining records to describe memory-mapped registers on the Raspberry Pi's arm/aarch64 processor. It is painful and brittle to do this in Pascal. Recent versions of Ada/GNAT allow one to define both field location and byte-order in a record representation clause. Has there been any discussion of extending fpc to allow this? Has a syntax been discussed? I looked on the future list and did not see anything related.
Thanks,
Dave

Reply by email

Wayne Sherman
to Unknown author
I am currently working on defining records to describe memory-mapped registers on the Raspberry Pi's arm/aarch64 processor. It is painful and brittle to do this in Pascal. Recent versions of Ada/GNAT allow one to define both field location and byte-order in a record representation clause.

Some short code examples that show what you are trying to do would be helpful.

ARM is little endian, does that differ from the byte-order of some registers?

Some relevant discussions:
https://forum.lazarus.freepascal.org/index.php/topic,46017.0.html https://forum.lazarus.freepascal.org/index.php?topic=49492.0 https://forum.lazarus.freepascal.org/index.php/topic,19107.msg113485.html#msg113485

Reply by email