Texas-instruments TMS320C3x Manual do Utilizador Página 128

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 757
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 127
Floating-Point Conversion (IEEE Std. 754)
5-23
Data Formats and Floating-Point Operation
Example 5–6.TMS320C3x-to-IEEE Conversion (Fast Version) (Continued)
* CYCLES: 14 (WORST CASE) WORDS: 15
*
.global TOIEEE
*
TOIEEE LDF R0,R0 ; Determine the sign of the number
LDFZ *+AR1(4),R0 ; If 0, load appropriate number
BND NEG ; Branch to NEG if negative (delayed)
ABSF R0 ; Take the absolute value of the number
LSH 1,R0 ; Eliminate the sign bit in R0
PUSHF R0
POP R0 ; Place number in lower 32 bits of R0
ADDI *+AR1(2),R0 ; Add exponent bias (127)
LSH
±1,R0 ; Add the positive sign
RETS
NEG POP R0 ; Place number in lower 32 bits
; of R0
ADDI *+AR1(2),R0 ; Add exponent bias (127)
LSH
±1,R0 ; Make space for the sign
ADDI *+AR1(3),R0 ; Add the negative sign
RETS
Vista de página 127
1 2 ... 123 124 125 126 127 128 129 130 131 132 133 ... 756 757

Comentários a estes Manuais

Sem comentários