数字类型
- 无符号整数
- 有符号整数
- 二进制编码十进制
- 压缩二进制编码十进制
- 单精度浮点数
- 双精度浮点数
- 双扩展浮点数
SIMD 扩展类型
- 64位压缩整数
- 128位压缩整数
- 128位压缩单精度浮点数
- 128位压缩双精度浮点数
整数
- 标准的整数大小
- Byte
- Word
- Doubleword
- Quadword
- 无符号整数
- 有符号整数
# inttest.s - An example of using signed integers
.section .data
data:
.int -45
.section .text
.globl _start
_start:
nop
movl $-345, %ecx
movw $0xffb1, %dx
movl data, %ebx
movl $1, %eax
int $0x80
- 扩展无符号整数
- 格式
movzx source, destination
- 示例
# movzxtest.s - An example of the MOVZX instruction
.section .text
.globl _start
_start:
nop
movl $279, %ecx
movzx %cl, %ebx
movl $1, %eax
int $0x80
- 扩展有符号整数
- 格式
movsx source, destination
- 示例
# movsxtest.s - An example of the MOVSX instruction
.section .text
.globl _start
_start:
nop
movw $-79, %cx
movl $0, %ebx
movw %cx, %bx
movsx %cx, %eax
movl $1, %eax
movl $0, %ebx
int $0x80
# quadtest.s - An example of quad integers
.section .data
data1:
.int 1, -1, 463345, -333252322, 0
data2:
.quad 1, -1, 463345, -333252322, 0
.section .text
.globl _start
_start:
nop
movl $1, %eax
movl $0, %ebx
int $0x80
SIMD 整数