3 loading floating-point constants – ARM VERSION 1.2 User Manual

Page 41

Advertising
background image

Writing ARM and Thumb Assembly Language

ARM DUI 0068B

Copyright © 2000, 2001 ARM Limited. All rights reserved.

2-29

LDR r2, =0xFFFFFFFF ; => MVN R2, #0
MOV pc, lr
LTORG ; Literal Pool 1 contains
; literal Ox55555555
func2
LDR r3, =0x55555555 ; => LDR R3, [PC, #offset to
; Literal Pool 1]
; LDR r4, =0x66666666 ; If this is uncommented it
; fails, because Literal Pool 2
; is out of reach
MOV pc, lr
LargeTable
SPACE 4200 ; Starting at the current location,
; clears a 4200 byte area of memory
; to zero
END ; Literal Pool 2 is empty

2.6.3

Loading floating-point constants

You can load any single-precision or double-precision floating-point constant in a single
instruction, using the

FLD

pseudo-instructions.

Refer to FLD pseudo-instruction on page 6-38 for details.

Advertising