waf/demos/asm/test.S

24 lines
249 B
ArmAsm
Raw Normal View History

2012-05-05 17:06:34 +02:00
#include "header.h"
2011-09-10 11:13:51 +02:00
.text
.align 2
2014-12-14 16:22:24 +01:00
.section .data
2011-09-10 11:13:51 +02:00
val:
2012-05-06 00:08:50 +02:00
.long SOME_VALUE
2011-09-10 11:13:51 +02:00
2012-05-06 00:08:50 +02:00
// Multiply input value by 421...
2011-09-10 11:13:51 +02:00
.global mult10
.type mult10, function
mult10:
2012-05-06 00:08:50 +02:00
pushq %rbp
movq %rsp,%rbp
2019-06-26 11:51:56 +02:00
movabs val,%eax
2012-05-06 00:08:50 +02:00
imull %edi,%eax
popq %rbp
ret