Intel Computer Hardware 80200 Manual de usuario Pagina 241

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 289
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 240
Developers Manual March, 2003 B-13
Intel
®
80200 Processor based on Intel
®
XScale
Microarchitecture
Optimization Guide
B.3.2 Bit Field Manipulation
The Intel
®
80200 processor shift and logical operations provide a useful way of manipulating bit
fields. Bit field operations can be optimized as follows:
;Set the bit number specified by r1 in register r0
mov r2, #1
orr r0, r0, r2, asl r1
;Clear the bit number specified by r1 in register r0
mov r2, #1
bic r0, r0, r2, asl r1
;Extract the bit-value of the bit number specified by r1 of the
;value in r0 storing the value in r0
mov r1, r0, asr r1
and r0, r1, #1
;Extract the higher order 8 bits of the value in r0 storing
;the result in r1
mov r1, r0, lsr #24
Vista de pagina 240
1 2 ... 236 237 238 239 240 241 242 243 244 245 246 ... 288 289

Comentarios a estos manuales

Sin comentarios