Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ARM assembly float variables

Im new to arm assembly and ive been learning a lot from this website here. At the end of this section here there its shows how to declare variables in assembly like so:

integer_array:
  .word 1,2,3,4

this works fine for integers but I need to be able to do this for floats and this:

float_array:
  .word 1.25,2.24,3.33

does not work, could someone show the correct way to declare float variables?

like image 355
A Person Avatar asked Aug 05 '26 02:08

A Person


1 Answers

Try

.single 0e1.25, 0e2.24, 0e3.33

(or .double). See the gas manual for flonums.

like image 180
hmakholm left over Monica Avatar answered Aug 07 '26 02:08

hmakholm left over Monica