Guest User

Untitled

a guest
Jun 25th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.50 KB | None | 0 0
  1. >type optest.dpr
  2.  
  3. program optest;
  4.  
  5. {$APPTYPE CONSOLE}
  6.  
  7. uses
  8. SysUtils;
  9.  
  10. type
  11. TMyType = packed record a, b, c, d: Byte; end;
  12.  
  13. var
  14. a, b, c: Cardinal;
  15. d: Word;
  16.  
  17. function InitializeMyType(const Input: Cardinal): TMyType; inline;
  18. begin
  19. result.a := Input;
  20. result.b := Input shr 8;
  21. result.c := Input shr 16;
  22. result.d := Input shr 24;
  23. end;
  24.  
  25. begin
  26. a := 0;
  27. b := 0;
  28. c := 0;
  29. d := 0;
  30. d := a;
  31.  
  32. InitializeMyType($AABBCCDD);
  33. end.
  34.  
  35. >c:objdump -d optest.o
  36.  
  37. optest.o: file format elf32-littlearm
  38.  
  39.  
  40. Disassembly of section .text.n_p$optest_initializemytype$longword$$tmytype:
  41.  
  42. 00000000 <P$OPTEST_INITIALIZEMYTYPE$LONGWORD$$TMYTYPE>:
  43. 0: e24dd008 sub sp, sp, #8
  44. 4: e20010ff and r1, r0, #255 ; 0xff
  45. 8: e5cd1000 strb r1, [sp]
  46. c: e1a01420 lsr r1, r0, #8
  47. 10: e20110ff and r1, r1, #255 ; 0xff
  48. 14: e5cd1001 strb r1, [sp, #1]
  49. 18: e1a01820 lsr r1, r0, #16
  50. 1c: e20110ff and r1, r1, #255 ; 0xff
  51. 20: e5cd1002 strb r1, [sp, #2]
  52. 24: e1a00c20 lsr r0, r0, #24
  53. 28: e20000ff and r0, r0, #255 ; 0xff
  54. 2c: e5cd0003 strb r0, [sp, #3]
  55. 30: e59d0000 ldr r0, [sp]
  56. 34: e28dd008 add sp, sp, #8
  57. 38: e1a0f00e mov pc, lr
  58.  
  59. Disassembly of section .text.n_main:
  60.  
  61. 00000000 <PASCALMAIN>:
  62. 0: e92d4000 push {lr}
  63. 4: e24dd004 sub sp, sp, #4
  64. 8: ebfffffe bl 0 <FPC_INITIALIZEUNITS>
  65. c: e3a00000 mov r0, #0
  66. 10: e3a00000 mov r0, #0
  67. 14: e3a00000 mov r0, #0
  68. 18: e3a00000 mov r0, #0
  69. 1c: e3a01000 mov r1, #0
  70. 20: e3a00000 mov r0, #0
  71. 24: e3a00000 mov r0, #0
  72. 28: e3a00000 mov r0, #0
  73. 2c: e1a00801 lsl r0, r1, #16
  74. 30: e1a00820 lsr r0, r0, #16
  75. 34: e59f3070 ldr r3, [pc, #112] ; ac <PASCALMAIN+0xac>
  76. 38: e20300ff and r0, r3, #255 ; 0xff
  77. 3c: e20010ff and r1, r0, #255 ; 0xff
  78. 40: e3e000ff mvn r0, #255 ; 0xff
  79. 44: e0022000 and r2, r2, r0
  80. 48: e1822001 orr r2, r2, r1
  81. 4c: e1a00423 lsr r0, r3, #8
  82. 50: e20000ff and r0, r0, #255 ; 0xff
  83. 54: e1a00400 lsl r0, r0, #8
  84. 58: e2000cff and r0, r0, #65280 ; 0xff00
  85. 5c: e3e01cff mvn r1, #65280 ; 0xff00
  86. 60: e0022001 and r2, r2, r1
  87. 64: e1822000 orr r2, r2, r0
  88. 68: e1a00823 lsr r0, r3, #16
  89. 6c: e20000ff and r0, r0, #255 ; 0xff
  90. 70: e1a00800 lsl r0, r0, #16
  91. 74: e20008ff and r0, r0, #16711680 ; 0xff0000
  92. 78: e3e018ff mvn r1, #16711680 ; 0xff0000
  93. 7c: e0022001 and r2, r2, r1
  94. 80: e1822000 orr r2, r2, r0
  95. 84: e1a00c23 lsr r0, r3, #24
  96. 88: e20000ff and r0, r0, #255 ; 0xff
  97. 8c: e1a00c00 lsl r0, r0, #24
  98. 90: e20004ff and r0, r0, #-16777216 ; 0xff000000
  99. 94: e3e014ff mvn r1, #-16777216 ; 0xff000000
  100. 98: e0022001 and r2, r2, r1
  101. 9c: e1822000 orr r2, r2, r0
  102. a0: ebfffffe bl 0 <FPC_DO_EXIT>
  103. a4: e28dd004 add sp, sp, #4
  104. a8: e8bd8000 pop {pc}
  105. ac: aabbccdd .word 0xaabbccdd
Add Comment
Please, Sign In to add comment