Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Latest commit

 

History

History
43 lines (33 loc) · 772 Bytes

p_52.md

File metadata and controls

43 lines (33 loc) · 772 Bytes

5.2 "Comprendre l’enregistrement d’activation et l’ABI"

Command to run the test (source code):

./chef.py test backend -bw doc/p_52.c
cat build/cpp-bin/assembly.s

Result :

.file  "p_52.c"
.text

.Ltext0:
  .globl main
  .type main, @function


main:
  pushq   %rbp
  movq    %rsp, %rbp
  subq $42, %rsp

  jmp    .L1_innerbeginof_main

.L1_innerbeginof_main:
  movl    $0, -8(%rbp)
  movq    -8(%rbp), %r10
  movq    %r10, -16(%rbp)                 # copyInstr
  movl    $0, -24(%rbp)
  movw    -24(%rbp), %r10w
  movw    %r10w, -26(%rbp)                 # copyInstr
  movl    $0, -34(%rbp)
  movl    -34(%rbp), %r10d
  movl    %r10d, -38(%rbp)                 # copyInstr
  jmp    .L0_endof_main

.L0_endof_main:
  leave
  ret