Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >type optest.dpr
- program optest;
- {$APPTYPE CONSOLE}
- uses
- SysUtils;
- type
- TMyType = packed record a, b, c, d: Byte; end;
- var
- a, b, c: Cardinal;
- d: Word;
- function InitializeMyType(const Input: Cardinal): TMyType; inline;
- begin
- result.a := Input;
- result.b := Input shr 8;
- result.c := Input shr 16;
- result.d := Input shr 24;
- end;
- begin
- a := 0;
- b := 0;
- c := 0;
- d := 0;
- d := a;
- InitializeMyType($AABBCCDD);
- end.
- >c:objdump -d optest.o
- optest.o: file format elf32-littlearm
- Disassembly of section .text.n_p$optest_initializemytype$longword$$tmytype:
- 00000000 <P$OPTEST_INITIALIZEMYTYPE$LONGWORD$$TMYTYPE>:
- 0: e24dd008 sub sp, sp, #8
- 4: e20010ff and r1, r0, #255 ; 0xff
- 8: e5cd1000 strb r1, [sp]
- c: e1a01420 lsr r1, r0, #8
- 10: e20110ff and r1, r1, #255 ; 0xff
- 14: e5cd1001 strb r1, [sp, #1]
- 18: e1a01820 lsr r1, r0, #16
- 1c: e20110ff and r1, r1, #255 ; 0xff
- 20: e5cd1002 strb r1, [sp, #2]
- 24: e1a00c20 lsr r0, r0, #24
- 28: e20000ff and r0, r0, #255 ; 0xff
- 2c: e5cd0003 strb r0, [sp, #3]
- 30: e59d0000 ldr r0, [sp]
- 34: e28dd008 add sp, sp, #8
- 38: e1a0f00e mov pc, lr
- Disassembly of section .text.n_main:
- 00000000 <PASCALMAIN>:
- 0: e92d4000 push {lr}
- 4: e24dd004 sub sp, sp, #4
- 8: ebfffffe bl 0 <FPC_INITIALIZEUNITS>
- c: e3a00000 mov r0, #0
- 10: e3a00000 mov r0, #0
- 14: e3a00000 mov r0, #0
- 18: e3a00000 mov r0, #0
- 1c: e3a01000 mov r1, #0
- 20: e3a00000 mov r0, #0
- 24: e3a00000 mov r0, #0
- 28: e3a00000 mov r0, #0
- 2c: e1a00801 lsl r0, r1, #16
- 30: e1a00820 lsr r0, r0, #16
- 34: e59f3070 ldr r3, [pc, #112] ; ac <PASCALMAIN+0xac>
- 38: e20300ff and r0, r3, #255 ; 0xff
- 3c: e20010ff and r1, r0, #255 ; 0xff
- 40: e3e000ff mvn r0, #255 ; 0xff
- 44: e0022000 and r2, r2, r0
- 48: e1822001 orr r2, r2, r1
- 4c: e1a00423 lsr r0, r3, #8
- 50: e20000ff and r0, r0, #255 ; 0xff
- 54: e1a00400 lsl r0, r0, #8
- 58: e2000cff and r0, r0, #65280 ; 0xff00
- 5c: e3e01cff mvn r1, #65280 ; 0xff00
- 60: e0022001 and r2, r2, r1
- 64: e1822000 orr r2, r2, r0
- 68: e1a00823 lsr r0, r3, #16
- 6c: e20000ff and r0, r0, #255 ; 0xff
- 70: e1a00800 lsl r0, r0, #16
- 74: e20008ff and r0, r0, #16711680 ; 0xff0000
- 78: e3e018ff mvn r1, #16711680 ; 0xff0000
- 7c: e0022001 and r2, r2, r1
- 80: e1822000 orr r2, r2, r0
- 84: e1a00c23 lsr r0, r3, #24
- 88: e20000ff and r0, r0, #255 ; 0xff
- 8c: e1a00c00 lsl r0, r0, #24
- 90: e20004ff and r0, r0, #-16777216 ; 0xff000000
- 94: e3e014ff mvn r1, #-16777216 ; 0xff000000
- 98: e0022001 and r2, r2, r1
- 9c: e1822000 orr r2, r2, r0
- a0: ebfffffe bl 0 <FPC_DO_EXIT>
- a4: e28dd004 add sp, sp, #4
- a8: e8bd8000 pop {pc}
- ac: aabbccdd .word 0xaabbccdd
Add Comment
Please, Sign In to add comment