2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-22 09:57:15 +01:00
waf/demos/asm/test.S
Björn Lindqvist f0b2fb9816 Fix crash in demos/asm
Crash is likely because gcc has become more strict in recent
version. To fix it I had to add the -no-pie flag and move mult10 to
the text section.
2023-09-26 22:39:40 +02:00

23 lines
240 B
ArmAsm

#include "header.h"
.data
val:
.long SOME_VALUE
.text
.align 2
// Multiply input value by 421...
.global mult10
.type mult10, @function
mult10:
pushq %rbp
movq %rsp,%rbp
movabs val,%eax
imull %edi,%eax
popq %rbp
ret