Home | History | Annotate | Line # | Download | only in pru
      1      1.1  christos # Check that DRAM memory access works.
      2      1.1  christos # mach: pru
      3      1.1  christos 
      4  1.1.1.2  christos # Copyright (C) 2016-2024 Free Software Foundation, Inc.
      5      1.1  christos # Contributed by Dimitar Dimitrov <dimitar@dinux.eu>
      6      1.1  christos #
      7      1.1  christos # This file is part of the GNU simulators.
      8      1.1  christos #
      9      1.1  christos # This program is free software; you can redistribute it and/or modify
     10      1.1  christos # it under the terms of the GNU General Public License as published by
     11      1.1  christos # the Free Software Foundation; either version 3 of the License, or
     12      1.1  christos # (at your option) any later version.
     13      1.1  christos #
     14      1.1  christos # This program is distributed in the hope that it will be useful,
     15      1.1  christos # but WITHOUT ANY WARRANTY; without even the implied warranty of
     16      1.1  christos # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     17      1.1  christos # GNU General Public License for more details.
     18      1.1  christos #
     19      1.1  christos # You should have received a copy of the GNU General Public License
     20      1.1  christos # along with this program.  If not, see <http://www.gnu.org/licenses/>.
     21      1.1  christos 
     22      1.1  christos .include "testutils.inc"
     23      1.1  christos 
     24      1.1  christos 	start
     25      1.1  christos 
     26      1.1  christos 	fill r20, 16
     27      1.1  christos 	ldi r10, 0
     28      1.1  christos 	not r10, r10
     29      1.1  christos 	qbne F, r20, r10
     30      1.1  christos 	qbne F, r21, r10
     31      1.1  christos 	qbne F, r22, r10
     32      1.1  christos 	qbne F, r23, r10
     33      1.1  christos 
     34      1.1  christos 	zero r20, 16
     35      1.1  christos 	qbne F, r20, 0
     36      1.1  christos 	qbne F, r21, 0
     37      1.1  christos 	qbne F, r22, 0
     38      1.1  christos 	qbne F, r23, 0
     39      1.1  christos 
     40      1.1  christos 	ldi r0, testarray
     41      1.1  christos 	lbbo &r20, r0, 0, 7
     42      1.1  christos 	qbne F, r20.b0, 0x01
     43      1.1  christos 	qbne F, r20.b1, 0x23
     44      1.1  christos 	qbne F, r20.b2, 0x45
     45      1.1  christos 	qbne F, r20.b3, 0x67
     46      1.1  christos 	qbne F, r21.b0, 0x89
     47      1.1  christos 	qbne F, r21.b1, 0xab
     48      1.1  christos 	qbne F, r21.b2, 0xcd
     49      1.1  christos 	qbne F, r21.b3, 0x00 ; Should not have been loaded!
     50      1.1  christos 	qbne F, r22, 0
     51      1.1  christos 	qbne F, r23, 0
     52      1.1  christos 
     53      1.1  christos 	ldi r1, 0x11
     54      1.1  christos 	sbbo &r1, r0, 9, 1
     55      1.1  christos 	ldi r1, 0x11
     56      1.1  christos 	sbbo &r1, r0, 12, 4
     57      1.1  christos 
     58      1.1  christos 	lbbo &r20, r0, 0, 16
     59      1.1  christos 	qbne F, r21.b3, 0xef
     60      1.1  christos 	qbne F, r22.b0, 0xff
     61      1.1  christos 	qbne F, r22.b1, 0x11
     62      1.1  christos 	qbne F, r22.b2, 0xff
     63      1.1  christos 	qbne F, r22.b3, 0xff
     64      1.1  christos 	qbne F, r23, 0x11
     65      1.1  christos 
     66      1.1  christos 	pass
     67      1.1  christos F:	fail
     68      1.1  christos 
     69      1.1  christos 	.data
     70      1.1  christos testarray:
     71      1.1  christos 	.byte 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef
     72      1.1  christos 	.byte 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
     73