From: Vince Weaver <vince@csl.cornell.edu>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [5283] Use the new concat_tl_i64 op for std and stda
Date: Tue, 23 Sep 2008 18:31:07 -0400 (EDT) [thread overview]
Message-ID: <20080923182937.Y10559@stanley.csl.cornell.edu> (raw)
In-Reply-To: <20080923180629.I10486@stanley.csl.cornell.edu>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 317 bytes --]
On Tue, 23 Sep 2008, Vince Weaver wrote:
>
> I can create a small assembly language program that duplicates the problem if
> it would help debugging it.
attached is a short assembly language program that shows the problem.
It fails with current SVN, but passes on real hardware and with patch 5283
reverted.
Vince
[-- Attachment #2: Type: APPLICATION/octet-stream, Size: 1127 bytes --]
[-- Attachment #3: Type: TEXT/PLAIN, Size: 2011 bytes --]
! as -Av8plus -o std_test.o std_test.s ; ld -o std_test std_test.o
.equ SYSCALL_EXIT,1
.equ SYSCALL_WRITE,4
.equ STDOUT,1
! This problem was noticed with crafty (which does 64-bit bit manipulations)
! After the "std" code moved to using tcg_gen_concat_tl_i64()
.globl _start
_start:
!
! TEST1 - high bits in y
!
set test1,%o1
call write_stdout
nop
tun_test1:
! Set some high bits in o4
! have to use sllx to get them there
set 0xff000000, %o5
sllx %o5,8,%o5
or %o5,0xff,%o5
set 0x00000000, %o4
set temp_mem, %o3
std %o4,[%o3] ! write 64-bit value, high 32bits from %o4
! low 32bits from %o5
ld [%o3],%g1 ! load back in the high 32 bits
set 0x00000000,%g2 ! result _should_ be 0
cmp %g1,%g2
beq test1_pass
nop
test1_fail:
set fail,%o1
ba test1_print
nop
test1_pass:
set pass,%o1
test1_print:
call write_stdout
nop
!================================
! Exit
!================================
exit:
mov 0,%o0 ! exit value
mov SYSCALL_EXIT,%g1 ! put the exit syscall number in g1
ta 0x10 ! and exit
!================================
! WRITE_STDOUT
!================================
! %o1 has string
write_stdout:
set SYSCALL_WRITE,%g1 ! Write syscall in %g1
set STDOUT,%o0 ! 1 in %o0 (stdout)
set 0,%o2 ! 0 (count) in %o2
str_loop1:
ldub [%o1+%o2],%l0 ! load byte
cmp %l0,%g0 ! compare against zero
bnz str_loop1 ! if not nul, repeat
! BRANCH DELAY SLOT
inc %o2 ! increment count
dec %o2 ! correct count
ta 0x10 ! run the syscall
retl ! return
nop
.data
fail: .ascii "Fail!\n\0"
pass: .ascii "Pass\n\0"
test1: .ascii "Test1: Storing 64-bit value : \0"
temp_mem: .int 0
temp_mem_lo: .int 0
next prev parent reply other threads:[~2008-09-23 22:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-23 21:49 [Qemu-devel] [5283] Use the new concat_tl_i64 op for std and stda Vince Weaver
2008-09-23 21:59 ` Paul Brook
2008-09-23 22:08 ` Vince Weaver
2008-09-23 22:31 ` Vince Weaver [this message]
2008-09-23 22:31 ` Paul Brook
-- strict thread matches above, loose matches on Subject: below --
2008-09-21 18:43 Blue Swirl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080923182937.Y10559@stanley.csl.cornell.edu \
--to=vince@csl.cornell.edu \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).