URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 38 |
Rev 156 |
.psize 0
|
.psize 0
|
.text
|
.text
|
#test jumps and calls
|
#test jumps and calls
|
1: jmp 1b
|
1: jmp 1b
|
jmp xxx
|
jmp xxx
|
jmp *xxx
|
jmp *xxx
|
jmp xxx(,1)
|
jmp xxx(,1)
|
jmp *%edi
|
jmp *%edi
|
jmp %edi
|
jmp %edi
|
jmp *(%edi)
|
jmp *(%edi)
|
jmp (%edi)
|
jmp (%edi)
|
ljmp *xxx(,%edi,4)
|
ljmp *xxx(,%edi,4)
|
ljmp xxx(,%edi,4)
|
ljmp xxx(,%edi,4)
|
ljmp *xxx
|
ljmp *xxx
|
ljmp xxx(,1)
|
ljmp xxx(,1)
|
ljmp $0x1234,$xxx
|
ljmp $0x1234,$xxx
|
|
|
call 1b
|
call 1b
|
call xxx
|
call xxx
|
call *xxx
|
call *xxx
|
call xxx(,1)
|
call xxx(,1)
|
call *%edi
|
call *%edi
|
call %edi
|
call %edi
|
call *(%edi)
|
call *(%edi)
|
call (%edi)
|
call (%edi)
|
lcall *xxx(,%edi,4)
|
lcall *xxx(,%edi,4)
|
lcall xxx(,%edi,4)
|
lcall xxx(,%edi,4)
|
lcall *xxx
|
lcall *xxx
|
lcall xxx(,1)
|
lcall xxx(,1)
|
lcall $0x1234,$xxx
|
lcall $0x1234,$xxx
|
|
|
# test various segment reg insns
|
# test various segment reg insns
|
push %ds
|
push %ds
|
pushl %ds
|
pushl %ds
|
pop %ds
|
pop %ds
|
popl %ds
|
popl %ds
|
mov %ds,%eax
|
mov %ds,%eax
|
movl %ds,%eax
|
movl %ds,%eax
|
movl %ds,%ax
|
movl %ds,%ax
|
mov %eax,%ds
|
mov %eax,%ds
|
movl %ax,%ds
|
movl %ax,%ds
|
movl %eax,%ds
|
movl %eax,%ds
|
|
|
pushw %ds
|
pushw %ds
|
popw %ds
|
popw %ds
|
mov %ds,%ax
|
mov %ds,%ax
|
movw %ds,%ax
|
movw %ds,%ax
|
movw %ds,%eax
|
movw %ds,%eax
|
mov %ax,%ds
|
mov %ax,%ds
|
movw %ax,%ds
|
movw %ax,%ds
|
movw %eax,%ds
|
movw %eax,%ds
|
|
|
# test various pushes
|
# test various pushes
|
pushl $10
|
pushl $10
|
pushw $10
|
pushw $10
|
push $10
|
push $10
|
pushl $1000
|
pushl $1000
|
pushw $1000
|
pushw $1000
|
push $1000
|
push $1000
|
pushl 1f
|
pushl 1f
|
pushw 1f
|
pushw 1f
|
push 1f
|
push 1f
|
push (1f-.)(%ebx)
|
push (1f-.)(%ebx)
|
push 1f-.
|
push 1f-.
|
# these, and others like them should have no operand size prefix
|
# these, and others like them should have no operand size prefix
|
1: lldt %cx
|
1: lldt %cx
|
lmsw %ax
|
lmsw %ax
|
|
|
# Just to make sure these don't become illegal due to over-enthusiastic
|
# Just to make sure these don't become illegal due to over-enthusiastic
|
# register checking
|
# register checking
|
movsbw %al,%di
|
movsbw %al,%di
|
movsbl %al,%ecx
|
movsbl %al,%ecx
|
movswl %ax,%ecx
|
movswl %ax,%ecx
|
movzbw %al,%di
|
movzbw %al,%di
|
movzbl %al,%ecx
|
movzbl %al,%ecx
|
movzwl %ax,%ecx
|
movzwl %ax,%ecx
|
|
|
in %dx,%al
|
in %dx,%al
|
in %dx,%ax
|
in %dx,%ax
|
in %dx,%eax
|
in %dx,%eax
|
in (%dx),%al
|
in (%dx),%al
|
in (%dx),%ax
|
in (%dx),%ax
|
in (%dx),%eax
|
in (%dx),%eax
|
inb %dx,%al
|
inb %dx,%al
|
inw %dx,%ax
|
inw %dx,%ax
|
inl %dx,%eax
|
inl %dx,%eax
|
inb %dx
|
inb %dx
|
inw %dx
|
inw %dx
|
inl %dx
|
inl %dx
|
inb $255
|
inb $255
|
inw $2
|
inw $2
|
inl $4
|
inl $4
|
in $13, %ax
|
in $13, %ax
|
out %al,%dx
|
out %al,%dx
|
out %ax,%dx
|
out %ax,%dx
|
out %eax,%dx
|
out %eax,%dx
|
out %al,(%dx)
|
out %al,(%dx)
|
out %ax,(%dx)
|
out %ax,(%dx)
|
out %eax,(%dx)
|
out %eax,(%dx)
|
outb %al,%dx
|
outb %al,%dx
|
outw %ax,%dx
|
outw %ax,%dx
|
outl %eax,%dx
|
outl %eax,%dx
|
outb %dx
|
outb %dx
|
outw %dx
|
outw %dx
|
outl %dx
|
outl %dx
|
outb $255
|
outb $255
|
outw $2
|
outw $2
|
outl $4
|
outl $4
|
out %ax, $13
|
out %ax, $13
|
# These are used in AIX.
|
# These are used in AIX.
|
inw (%dx)
|
inw (%dx)
|
outw (%dx)
|
outw (%dx)
|
|
|
movsb
|
movsb
|
cmpsw
|
cmpsw
|
scasl
|
scasl
|
xlatb
|
xlatb
|
movsl %cs:(%esi),%es:(%edi)
|
movsl %cs:(%esi),%es:(%edi)
|
setae (%ebx)
|
setae (%ebx)
|
setaeb (%ebx)
|
setaeb (%ebx)
|
setae %al
|
setae %al
|
|
|
#these should give warnings
|
#these should give warnings
|
orb $1,%ax
|
orb $1,%ax
|
orb $1,%eax
|
orb $1,%eax
|
orb $1,%bx
|
orb $1,%bx
|
orb $1,%ebx
|
orb $1,%ebx
|
fldl %st(1)
|
fldl %st(1)
|
fstl %st(2)
|
fstl %st(2)
|
fstpl %st(3)
|
fstpl %st(3)
|
fcoml %st(4)
|
fcoml %st(4)
|
fcompl %st(5)
|
fcompl %st(5)
|
faddp %st(1),%st
|
faddp %st(1),%st
|
fmulp %st(2),%st
|
fmulp %st(2),%st
|
fsubp %st(3),%st
|
fsubp %st(3),%st
|
fsubrp %st(4),%st
|
fsubrp %st(4),%st
|
fdivp %st(5),%st
|
fdivp %st(5),%st
|
fdivrp %st(6),%st
|
fdivrp %st(6),%st
|
fadd
|
fadd
|
fsub
|
fsub
|
fmul
|
fmul
|
fdiv
|
fdiv
|
fsubr
|
fsubr
|
fdivr
|
fdivr
|
#these should all be legal
|
#these should all be legal
|
btl %edx, 0x123456
|
btl %edx, 0x123456
|
btl %edx, %eax
|
btl %edx, %eax
|
orb $1,%al
|
orb $1,%al
|
orb $1,%bl
|
orb $1,%bl
|
movl 17,%eax
|
movl 17,%eax
|
mov 17,%eax
|
mov 17,%eax
|
inw %dx,%ax
|
inw %dx,%ax
|
inl %dx,%eax
|
inl %dx,%eax
|
inw (%dx),%ax
|
inw (%dx),%ax
|
inl (%dx),%eax
|
inl (%dx),%eax
|
in (%dx),%al
|
in (%dx),%al
|
in (%dx),%ax
|
in (%dx),%ax
|
in (%dx),%eax
|
in (%dx),%eax
|
movzbl (%edi,%esi),%edx
|
movzbl (%edi,%esi),%edx
|
movzbl 28(%ebp),%eax
|
movzbl 28(%ebp),%eax
|
movzbl %al,%eax
|
movzbl %al,%eax
|
movzbl %cl,%esi
|
movzbl %cl,%esi
|
xlat %es:(%ebx)
|
xlat %es:(%ebx)
|
xlat
|
xlat
|
xlatb
|
xlatb
|
1: fstp %st(0)
|
1: fstp %st(0)
|
loop 1b
|
loop 1b
|
divb %cl
|
divb %cl
|
divw %cx
|
divw %cx
|
divl %ecx
|
divl %ecx
|
div %cl
|
div %cl
|
div %cx
|
div %cx
|
div %ecx
|
div %ecx
|
div %cl,%al
|
div %cl,%al
|
div %cx,%ax
|
div %cx,%ax
|
div %ecx,%eax
|
div %ecx,%eax
|
mov %si,%ds
|
mov %si,%ds
|
movl %si,%ds # warning here
|
movl %si,%ds # warning here
|
pushl %ds
|
pushl %ds
|
push %ds
|
push %ds
|
mov 0,%al
|
mov 0,%al
|
mov 0x10000,%ax
|
mov 0x10000,%ax
|
mov %eax,%ebx
|
mov %eax,%ebx
|
pushf
|
pushf
|
pushfl
|
pushfl
|
pushfw
|
pushfw
|
popf
|
popf
|
popfl
|
popfl
|
popfw
|
popfw
|
mov %esi,(,%ebx,1)
|
mov %esi,(,%ebx,1)
|
andb $~0x80,foo
|
andb $~0x80,foo
|
|
|
and $0xfffe,%ax
|
and $0xfffe,%ax
|
and $0xff00,%ax
|
and $0xff00,%ax
|
and $0xfffe,%eax
|
and $0xfffe,%eax
|
and $0xff00,%eax
|
and $0xff00,%eax
|
and $0xfffffffe,%eax
|
and $0xfffffffe,%eax
|
|
|
.code16
|
.code16
|
and $0xfffe,%ax
|
and $0xfffe,%ax
|
and $0xff00,%ax
|
and $0xff00,%ax
|
and $0xfffe,%eax
|
and $0xfffe,%eax
|
and $0xff00,%eax
|
and $0xff00,%eax
|
and $0xfffffffe,%eax
|
and $0xfffffffe,%eax
|
|
|
#check 16-bit code auto address prefix
|
#check 16-bit code auto address prefix
|
.code16gcc
|
.code16gcc
|
leal -256(%ebp),%edx
|
leal -256(%ebp),%edx
|
mov %al,-129(%ebp)
|
mov %al,-129(%ebp)
|
mov %ah,-128(%ebp)
|
mov %ah,-128(%ebp)
|
leal -1760(%ebp),%ebx
|
leal -1760(%ebp),%ebx
|
movl %eax,140(%esp)
|
movl %eax,140(%esp)
|
|
|
.code32
|
.code32
|
# Make sure that we won't remove movzb by accident.
|
# Make sure that we won't remove movzb by accident.
|
movzb %al,%di
|
movzb %al,%di
|
movzb %al,%ecx
|
movzb %al,%ecx
|
|
|
# Force a good alignment.
|
# Force a good alignment.
|
.p2align 4,0
|
.p2align 4,0
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.