> compile NEMU
ysyx_22040000 李心杨 Linux calcite 6.6.19 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 1 12:35:11 UTC 2024 x86_64 GNU/Linux 16:26:21 up 4 days 3:32, 2 users, load average: 0.85, 0.91, 0.95
This commit is contained in:
parent
a210694e82
commit
d08c2860da
415 changed files with 44314 additions and 11 deletions
42
am-kernels/tests/alu-tests/LICENSE
Normal file
42
am-kernels/tests/alu-tests/LICENSE
Normal file
|
@ -0,0 +1,42 @@
|
|||
This software is licensed under a BSD Style License
|
||||
|
||||
Copyright (c) 2015 Battelle Memorial Institute. All Rights Reserved.
|
||||
http://www.battelle.org/
|
||||
|
||||
Redistribution and use of this software and associated documentation
|
||||
("Software"), with or without modification, are permitted provided that the
|
||||
following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain copyright statements and
|
||||
notices. Redistributions must also contain a copy of this document.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The names "M/o/Vfuscator" and "Battelle" must not be used to endorse or
|
||||
promote products derived from this Software without prior written
|
||||
permission of Battelle Memorial Institute. For written permission,
|
||||
please contact solutions@battelle.org
|
||||
|
||||
4. Products derived from this Software may not be called "M/o/Vfuscator" or
|
||||
"Battelle", nor may "M/o/Vfuscator" or "Battelle" appear in their names
|
||||
without prior written permission of Battelle Memorial Institute.
|
||||
Battelle is a registered trademark of Battelle Memorial Institute.
|
||||
|
||||
5. Due credit should be given to the Battelle Memorial Institute.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY BATTELLE MEMORIAL INSTITUTE "AS IS" AND ANY
|
||||
EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL BATTELLE MEMORIAL INSTITUTE OR ITS
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The original author of this software is Christopher P. Domas, an employee of
|
||||
the Battelle Memorial Institute.
|
11
am-kernels/tests/alu-tests/Makefile
Normal file
11
am-kernels/tests/alu-tests/Makefile
Normal file
|
@ -0,0 +1,11 @@
|
|||
NAME = alutest
|
||||
SRCS = build/alu_test.c
|
||||
include $(AM_HOME)/Makefile
|
||||
|
||||
GENERATOR = build/gen_alu_test
|
||||
|
||||
$(GENERATOR): gen_alu_test.c
|
||||
gcc -O2 -Wall -Werror $^ -o $@
|
||||
|
||||
$(SRCS): $(GENERATOR)
|
||||
$^ > $@
|
22365
am-kernels/tests/alu-tests/build/alu_test.c
Normal file
22365
am-kernels/tests/alu-tests/build/alu_test.c
Normal file
File diff suppressed because it is too large
Load diff
BIN
am-kernels/tests/alu-tests/build/gen_alu_test
Executable file
BIN
am-kernels/tests/alu-tests/build/gen_alu_test
Executable file
Binary file not shown.
135
am-kernels/tests/alu-tests/gen_alu_test.c
Normal file
135
am-kernels/tests/alu-tests/gen_alu_test.c
Normal file
|
@ -0,0 +1,135 @@
|
|||
/* this program generates an arithmetic test for the M/o/Vfuscator */
|
||||
|
||||
/* it should be compiled with gcc, and its output compiled with the
|
||||
* M/o/Vfuscator, to verify the MOV ALU calculates the same results as those
|
||||
* from a program compiled with gcc */
|
||||
|
||||
/* gcc gen_test.c && ./a.out > test.c && movcc test.c movfusator/lib/softfloat64.o && ./a.out | grep FAIL */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
//static const double vd[]={-2.0, -1.0, 0.0, 1.0, 2.0};
|
||||
//static const float vf[]={-2.0f, -1.0f, 0.0f, 1.0f, 2.0f};
|
||||
|
||||
static const signed int vsi[]={0x80000000, 0x80000001, -2, -1, 0, 1, 2, 0x7ffffffe, 0x7fffffff};
|
||||
static const signed short vss[]={0x8000, 0x8001, -2, -1, 0, 1, 2, 0x7ffe, 0x7fff};
|
||||
static const signed char vsc[]={0x80, 0x81, -2, -1, 0, 1, 2, 0x7e, 0x7f};
|
||||
|
||||
static const unsigned int vui[]={0x80000000, 0x80000001, -2, -1, 0, 1, 2, 0x7ffffffe, 0x7fffffff};
|
||||
static const unsigned short vus[]={0x8000, 0x8001, -2, -1, 0, 1, 2, 0x7ffe, 0x7fff};
|
||||
static const unsigned char vuc[]={0x80, 0x81, -2, -1, 0, 1, 2, 0x7e, 0x7f};
|
||||
|
||||
#define TEST_STRING " printf(\"line %%d: %%s: %%d %%s %%d == %%d => %%s (%%d)\\n\","\
|
||||
"__LINE__,\"%s\",0x%x,\"%s\",0x%x,0x%x,(%s)(x%sy)==0x%x?\"PASS\":\"FAIL\",(%s)(x%sy));\n"
|
||||
|
||||
#define TEST_STRING_F " printf(\"%%20s: %%20f %%2s %%-20f == %%-20f => %%8s (%%f)\\n\","\
|
||||
"\"%s\",%f,\"%s\",%f,%f,(%s)(x%sy)==%f?\"PASS\":\"FAIL\",(%s)(x%sy));\n"
|
||||
|
||||
#define TEST_PARMS(type,set,op) \
|
||||
#type,set[i],#op,set[j],(type)(set[i] op set[j]),#type,#op,(type)(set[i] op set[j]),#type,#op
|
||||
|
||||
#define S_F "%f"
|
||||
#define S_I "%d"
|
||||
|
||||
#define FOR_SET(ss,tt,string,type,set,op) {\
|
||||
int i, j; \
|
||||
int c=sizeof((set))/sizeof(*(set)); \
|
||||
for (i=0; i<c; i++) \
|
||||
for (j=i; j<c; j++) { \
|
||||
if (!exclude(tt, #op, set[i], set[j])) { \
|
||||
printf("{\n"); \
|
||||
printf(" volatile %s x=" ss "; volatile %s y=" ss ";\n", #type, set[i], #type, set[j]); \
|
||||
printf(" if ((%s)(x%sy)!=(%s)%d) {\n", #type, #op, #type, (type)(set[i] op set[j])); \
|
||||
printf(string, TEST_PARMS(type,set,op)); \
|
||||
printf(" exit_code = 1;}}\n"); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
||||
#define FOR_SET_ALL(type,set) {\
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,+); \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,-); \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,^); \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,&); \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,|); \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,<<); \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,>>); \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,&&); \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,||); \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,>) \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,<) \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,>=) \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,<=) \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,==) \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,!=) \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,*); \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,/); \
|
||||
FOR_SET(S_I,I,TEST_STRING,type,set,%); \
|
||||
}
|
||||
|
||||
#define FOR_SET_FLOAT(type,set) {\
|
||||
FOR_SET(S_F,F,TEST_STRING_F,type,set,+); \
|
||||
FOR_SET(S_F,F,TEST_STRING_F,type,set,-); \
|
||||
FOR_SET(S_F,F,TEST_STRING_F,type,set,*); \
|
||||
FOR_SET(S_F,F,TEST_STRING_F,type,set,/); \
|
||||
FOR_SET(S_F,F,TEST_STRING_F,type,set,>) \
|
||||
FOR_SET(S_F,F,TEST_STRING_F,type,set,<) \
|
||||
FOR_SET(S_F,F,TEST_STRING_F,type,set,>=) \
|
||||
FOR_SET(S_F,F,TEST_STRING_F,type,set,<=) \
|
||||
FOR_SET(S_F,F,TEST_STRING_F,type,set,==) \
|
||||
FOR_SET(S_F,F,TEST_STRING_F,type,set,!=) \
|
||||
}
|
||||
|
||||
typedef enum { I, F } type;
|
||||
|
||||
static int strsame(const char *s1, const char *s2) {
|
||||
return strcmp(s1, s2) == 0;
|
||||
}
|
||||
|
||||
int exclude(type t, char* op, int x, int y)
|
||||
{
|
||||
if (t==I) {
|
||||
if (strsame(op, "/") || strsame(op, "%")) {
|
||||
if (y==0 || (y==-1 && x==0x80000000)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else if (strsame(op, ">>") || strsame(op, "<<")) {
|
||||
if (y>31 || y<0) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (t==F) {
|
||||
if (strsame(op, "/")) {
|
||||
if (y==0) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("#include <stdio.h>\n");
|
||||
printf("int main(void) {\n");
|
||||
printf(" int exit_code = 0;\n");
|
||||
|
||||
FOR_SET_ALL(signed int, vsi);
|
||||
FOR_SET_ALL(signed short, vss);
|
||||
FOR_SET_ALL(signed char, vsc);
|
||||
|
||||
FOR_SET_ALL(unsigned int, vui);
|
||||
FOR_SET_ALL(unsigned short, vus);
|
||||
FOR_SET_ALL(unsigned char, vuc);
|
||||
|
||||
//FOR_SET_FLOAT(float, vf);
|
||||
//FOR_SET_FLOAT(double, vf);
|
||||
|
||||
printf(" return exit_code;\n");
|
||||
printf("}\n");
|
||||
|
||||
return 0;
|
||||
}
|
3
am-kernels/tests/am-tests/Makefile
Normal file
3
am-kernels/tests/am-tests/Makefile
Normal file
|
@ -0,0 +1,3 @@
|
|||
NAME = amtest
|
||||
SRCS = $(shell find src/ -name "*.[cS]")
|
||||
include $(AM_HOME)/Makefile
|
24
am-kernels/tests/am-tests/include/amtest.h
Normal file
24
am-kernels/tests/am-tests/include/amtest.h
Normal file
|
@ -0,0 +1,24 @@
|
|||
#ifndef __AMUNIT_H__
|
||||
#define __AMUNIT_H__
|
||||
|
||||
#include <am.h>
|
||||
#include <klib.h>
|
||||
#include <klib-macros.h>
|
||||
|
||||
#define IOE ({ ioe_init(); })
|
||||
#define CTE(h) ({ Context *h(Event, Context *); cte_init(h); })
|
||||
#define VME(f1, f2) ({ void *f1(int); void f2(void *); vme_init(f1, f2); })
|
||||
#define MPE ({ mpe_init(entry); })
|
||||
|
||||
extern void (*entry)();
|
||||
|
||||
#define CASE(id, entry_, ...) \
|
||||
case id: { \
|
||||
void entry_(); \
|
||||
entry = entry_; \
|
||||
__VA_ARGS__; \
|
||||
entry_(); \
|
||||
break; \
|
||||
}
|
||||
|
||||
#endif
|
39
am-kernels/tests/am-tests/src/main.c
Normal file
39
am-kernels/tests/am-tests/src/main.c
Normal file
|
@ -0,0 +1,39 @@
|
|||
#include <amtest.h>
|
||||
|
||||
void (*entry)() = NULL; // mp entry
|
||||
|
||||
static const char *tests[256] = {
|
||||
['h'] = "hello",
|
||||
['H'] = "display this help message",
|
||||
['i'] = "interrupt/yield test",
|
||||
['d'] = "scan devices",
|
||||
['m'] = "multiprocessor test",
|
||||
['t'] = "real-time clock test",
|
||||
['k'] = "readkey test",
|
||||
['v'] = "display test",
|
||||
['a'] = "audio test",
|
||||
['p'] = "x86 virtual memory test",
|
||||
};
|
||||
|
||||
int main(const char *args) {
|
||||
switch (args[0]) {
|
||||
CASE('h', hello);
|
||||
CASE('i', hello_intr, IOE, CTE(simple_trap));
|
||||
CASE('d', devscan, IOE);
|
||||
CASE('m', mp_print, MPE);
|
||||
CASE('t', rtc_test, IOE);
|
||||
CASE('k', keyboard_test, IOE);
|
||||
CASE('v', video_test, IOE);
|
||||
CASE('a', audio_test, IOE);
|
||||
CASE('p', vm_test, CTE(vm_handler), VME(simple_pgalloc, simple_pgfree));
|
||||
case 'H':
|
||||
default:
|
||||
printf("Usage: make run mainargs=*\n");
|
||||
for (int ch = 0; ch < 256; ch++) {
|
||||
if (tests[ch]) {
|
||||
printf(" %c: %s\n", ch, tests[ch]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
27
am-kernels/tests/am-tests/src/tests/audio.c
Normal file
27
am-kernels/tests/am-tests/src/tests/audio.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
#include <amtest.h>
|
||||
|
||||
void audio_test() {
|
||||
if (!io_read(AM_AUDIO_CONFIG).present) {
|
||||
printf("WARNING: %s does not support audio\n", TOSTRING(__ARCH__));
|
||||
return;
|
||||
}
|
||||
|
||||
io_write(AM_AUDIO_CTRL, 8000, 1, 1024);
|
||||
|
||||
extern uint8_t audio_payload, audio_payload_end;
|
||||
uint32_t audio_len = &audio_payload_end - &audio_payload;
|
||||
int nplay = 0;
|
||||
Area sbuf;
|
||||
sbuf.start = &audio_payload;
|
||||
while (nplay < audio_len) {
|
||||
int len = (audio_len - nplay > 4096 ? 4096 : audio_len - nplay);
|
||||
sbuf.end = sbuf.start + len;
|
||||
io_write(AM_AUDIO_PLAY, sbuf);
|
||||
sbuf.start += len;
|
||||
nplay += len;
|
||||
printf("Already play %d/%d bytes of data\n", nplay, audio_len);
|
||||
}
|
||||
|
||||
// wait until the audio finishes
|
||||
while (io_read(AM_AUDIO_STATUS).count > 0);
|
||||
}
|
1
am-kernels/tests/am-tests/src/tests/audio/.gitignore
vendored
Normal file
1
am-kernels/tests/am-tests/src/tests/audio/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
!*.pcm
|
6
am-kernels/tests/am-tests/src/tests/audio/audio-data.S
Normal file
6
am-kernels/tests/am-tests/src/tests/audio/audio-data.S
Normal file
|
@ -0,0 +1,6 @@
|
|||
.section .data
|
||||
.global audio_payload, audio_payload_end
|
||||
.p2align 3
|
||||
audio_payload:
|
||||
.incbin "src/tests/audio/little-star.pcm"
|
||||
audio_payload_end:
|
BIN
am-kernels/tests/am-tests/src/tests/audio/little-star.pcm
Normal file
BIN
am-kernels/tests/am-tests/src/tests/audio/little-star.pcm
Normal file
Binary file not shown.
69
am-kernels/tests/am-tests/src/tests/devscan.c
Normal file
69
am-kernels/tests/am-tests/src/tests/devscan.c
Normal file
|
@ -0,0 +1,69 @@
|
|||
#include <amtest.h>
|
||||
|
||||
static void input_test() {
|
||||
printf("Input device test skipped.\n");
|
||||
}
|
||||
|
||||
static void timer_test() {
|
||||
AM_TIMER_UPTIME_T uptime;
|
||||
uint32_t t0, t1;
|
||||
|
||||
uptime = io_read(AM_TIMER_UPTIME);
|
||||
t0 = uptime.us / 1000;
|
||||
|
||||
for (int volatile i = 0; i < 10000000; i ++) ;
|
||||
|
||||
uptime = io_read(AM_TIMER_UPTIME);
|
||||
t1 = uptime.us / 1000;
|
||||
|
||||
printf("Loop 10^7 time elapse: %d ms\n", t1 - t0);
|
||||
}
|
||||
|
||||
static uint8_t vmem[512 << 10];
|
||||
static inline gpuptr_t to_guest(void *ptr) { return ptr ? (uint8_t *)ptr - vmem : AM_GPU_NULL; }
|
||||
|
||||
static void video_test() {
|
||||
AM_GPU_CONFIG_T info = io_read(AM_GPU_CONFIG);
|
||||
int w = info.width, h = info.height;
|
||||
printf("Screen size: %d x %d\n", w, h);
|
||||
|
||||
struct gpu_canvas *cv = (void *)vmem;
|
||||
|
||||
for (uint8_t *p = (void *)&cv[8]; p != vmem + sizeof(vmem); p++)
|
||||
*p = rand() & 0xff;
|
||||
|
||||
cv[0] = (struct gpu_canvas) {
|
||||
.w = -1, .h = -1, .x1 = w / 4, .y1 = 0, .w1 = w / 2, .h1 = h - 100,
|
||||
.type = AM_GPU_TEXTURE,
|
||||
.texture = (struct gpu_texturedesc) {
|
||||
.w = 37, .h = 10,
|
||||
.pixels = to_guest(&cv[8]),
|
||||
},
|
||||
.sibling = to_guest(NULL),
|
||||
};
|
||||
|
||||
io_write(AM_GPU_MEMCPY, 0, vmem, sizeof(vmem));
|
||||
io_write(AM_GPU_RENDER, 0);
|
||||
}
|
||||
|
||||
static void storage_test() {
|
||||
#define nbytes 512
|
||||
static char buf[nbytes];
|
||||
AM_DISK_CONFIG_T info = io_read(AM_DISK_CONFIG);
|
||||
printf("Storage: %d blocks of %d size. Show first 512 bytes\n", info.blkcnt, info.blksz);
|
||||
io_write(AM_DISK_BLKIO, false, buf, 0, nbytes / info.blksz);
|
||||
for (uint32_t i = 0; i < nbytes; i += 2) {
|
||||
printf("%02x%02x ", buf[i] & 0xff, buf[i+1] & 0xff);
|
||||
if ((i+2) % 32 == 0) printf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
void devscan() {
|
||||
printf("heap = [%08x, %08x)\n", heap.start, heap.end);
|
||||
input_test();
|
||||
timer_test();
|
||||
video_test();
|
||||
storage_test();
|
||||
printf("Test End!\n");
|
||||
while (1);
|
||||
}
|
7
am-kernels/tests/am-tests/src/tests/hello.c
Normal file
7
am-kernels/tests/am-tests/src/tests/hello.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include <amtest.h>
|
||||
|
||||
void hello() {
|
||||
for (int i = 0; i < 10; i ++) {
|
||||
putstr("Hello, AM World @ " __ISA__ "\n");
|
||||
}
|
||||
}
|
26
am-kernels/tests/am-tests/src/tests/intr.c
Normal file
26
am-kernels/tests/am-tests/src/tests/intr.c
Normal file
|
@ -0,0 +1,26 @@
|
|||
#include <amtest.h>
|
||||
|
||||
Context *simple_trap(Event ev, Context *ctx) {
|
||||
switch(ev.event) {
|
||||
case EVENT_IRQ_TIMER:
|
||||
putch('t'); break;
|
||||
case EVENT_IRQ_IODEV:
|
||||
putch('d'); break;
|
||||
case EVENT_YIELD:
|
||||
putch('y'); break;
|
||||
default:
|
||||
panic("Unhandled event"); break;
|
||||
}
|
||||
return ctx;
|
||||
}
|
||||
|
||||
void hello_intr() {
|
||||
printf("Hello, AM World @ " __ISA__ "\n");
|
||||
printf(" t = timer, d = device, y = yield\n");
|
||||
io_read(AM_INPUT_CONFIG);
|
||||
iset(1);
|
||||
while (1) {
|
||||
for (volatile int i = 0; i < 10000000; i++) ;
|
||||
yield();
|
||||
}
|
||||
}
|
35
am-kernels/tests/am-tests/src/tests/keyboard.c
Normal file
35
am-kernels/tests/am-tests/src/tests/keyboard.c
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include <amtest.h>
|
||||
|
||||
#define NAMEINIT(key) [ AM_KEY_##key ] = #key,
|
||||
static const char *names[] = {
|
||||
AM_KEYS(NAMEINIT)
|
||||
};
|
||||
|
||||
static bool has_uart, has_kbd;
|
||||
|
||||
static void drain_keys() {
|
||||
if (has_uart) {
|
||||
while (1) {
|
||||
char ch = io_read(AM_UART_RX).data;
|
||||
if (ch == (char)-1) break;
|
||||
printf("Got (uart): %c (%d)\n", ch, ch & 0xff);
|
||||
}
|
||||
}
|
||||
|
||||
if (has_kbd) {
|
||||
while (1) {
|
||||
AM_INPUT_KEYBRD_T ev = io_read(AM_INPUT_KEYBRD);
|
||||
if (ev.keycode == AM_KEY_NONE) break;
|
||||
printf("Got (kbd): %s (%d) %s\n", names[ev.keycode], ev.keycode, ev.keydown ? "DOWN" : "UP");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void keyboard_test() {
|
||||
printf("Try to press any key (uart or keyboard)...\n");
|
||||
has_uart = io_read(AM_UART_CONFIG).present;
|
||||
has_kbd = io_read(AM_INPUT_CONFIG).present;
|
||||
while (1) {
|
||||
drain_keys();
|
||||
}
|
||||
}
|
7
am-kernels/tests/am-tests/src/tests/mp.c
Normal file
7
am-kernels/tests/am-tests/src/tests/mp.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include <amtest.h>
|
||||
|
||||
void mp_print() {
|
||||
while (1) {
|
||||
printf("%d", cpu_current());
|
||||
}
|
||||
}
|
17
am-kernels/tests/am-tests/src/tests/rtc.c
Normal file
17
am-kernels/tests/am-tests/src/tests/rtc.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include <amtest.h>
|
||||
|
||||
void rtc_test() {
|
||||
AM_TIMER_RTC_T rtc;
|
||||
int sec = 1;
|
||||
while (1) {
|
||||
while(io_read(AM_TIMER_UPTIME).us / 1000000 < sec) ;
|
||||
rtc = io_read(AM_TIMER_RTC);
|
||||
printf("%d-%d-%d %02d:%02d:%02d GMT (", rtc.year, rtc.month, rtc.day, rtc.hour, rtc.minute, rtc.second);
|
||||
if (sec == 1) {
|
||||
printf("%d second).\n", sec);
|
||||
} else {
|
||||
printf("%d seconds).\n", sec);
|
||||
}
|
||||
sec ++;
|
||||
}
|
||||
}
|
90
am-kernels/tests/am-tests/src/tests/video.c
Normal file
90
am-kernels/tests/am-tests/src/tests/video.c
Normal file
|
@ -0,0 +1,90 @@
|
|||
#include <amtest.h>
|
||||
|
||||
#define FPS 30
|
||||
#define N 32
|
||||
|
||||
static inline uint32_t pixel(uint8_t r, uint8_t g, uint8_t b) {
|
||||
return (r << 16) | (g << 8) | b;
|
||||
}
|
||||
static inline uint8_t R(uint32_t p) { return p >> 16; }
|
||||
static inline uint8_t G(uint32_t p) { return p >> 8; }
|
||||
static inline uint8_t B(uint32_t p) { return p; }
|
||||
|
||||
static uint32_t canvas[N][N];
|
||||
static int used[N][N];
|
||||
|
||||
static uint32_t color_buf[32 * 32];
|
||||
|
||||
void redraw() {
|
||||
int w = io_read(AM_GPU_CONFIG).width / N;
|
||||
int h = io_read(AM_GPU_CONFIG).height / N;
|
||||
int block_size = w * h;
|
||||
assert((uint32_t)block_size <= LENGTH(color_buf));
|
||||
|
||||
int x, y, k;
|
||||
for (y = 0; y < N; y ++) {
|
||||
for (x = 0; x < N; x ++) {
|
||||
for (k = 0; k < block_size; k ++) {
|
||||
color_buf[k] = canvas[y][x];
|
||||
}
|
||||
io_write(AM_GPU_FBDRAW, x * w, y * h, color_buf, w, h, false);
|
||||
}
|
||||
}
|
||||
io_write(AM_GPU_FBDRAW, 0, 0, NULL, 0, 0, true);
|
||||
}
|
||||
|
||||
static uint32_t p(int tsc) {
|
||||
int b = tsc & 0xff;
|
||||
return pixel(b * 6, b * 7, b);
|
||||
}
|
||||
|
||||
void update() {
|
||||
static int tsc = 0;
|
||||
static int dx[4] = {0, 1, 0, -1};
|
||||
static int dy[4] = {1, 0, -1, 0};
|
||||
|
||||
tsc ++;
|
||||
|
||||
for (int i = 0; i < N; i ++)
|
||||
for (int j = 0; j < N; j ++) {
|
||||
used[i][j] = 0;
|
||||
}
|
||||
|
||||
int init = tsc * 1;
|
||||
canvas[0][0] = p(init); used[0][0] = 1;
|
||||
int x = 0, y = 0, d = 0;
|
||||
for (int step = 1; step < N * N; step ++) {
|
||||
for (int t = 0; t < 4; t ++) {
|
||||
int x1 = x + dx[d], y1 = y + dy[d];
|
||||
if (x1 >= 0 && x1 < N && y1 >= 0 && y1 < N && !used[x1][y1]) {
|
||||
x = x1; y = y1;
|
||||
used[x][y] = 1;
|
||||
canvas[x][y] = p(init + step / 2);
|
||||
break;
|
||||
}
|
||||
d = (d + 1) % 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void video_test() {
|
||||
unsigned long last = 0;
|
||||
unsigned long fps_last = 0;
|
||||
int fps = 0;
|
||||
|
||||
while (1) {
|
||||
unsigned long upt = io_read(AM_TIMER_UPTIME).us / 1000;
|
||||
if (upt - last > 1000 / FPS) {
|
||||
update();
|
||||
redraw();
|
||||
last = upt;
|
||||
fps ++;
|
||||
}
|
||||
if (upt - fps_last > 1000) {
|
||||
// display fps every 1s
|
||||
printf("%d: FPS = %d\n", upt, fps);
|
||||
fps_last = upt;
|
||||
fps = 0;
|
||||
}
|
||||
}
|
||||
}
|
90
am-kernels/tests/am-tests/src/tests/vm.c
Normal file
90
am-kernels/tests/am-tests/src/tests/vm.c
Normal file
|
@ -0,0 +1,90 @@
|
|||
#include <amtest.h>
|
||||
|
||||
static Context *uctx;
|
||||
static AddrSpace prot;
|
||||
static uintptr_t st = 0;
|
||||
static int first_trap = 1;
|
||||
|
||||
void *simple_pgalloc(int size) {
|
||||
if (st == 0) { st = (uintptr_t)heap.start; }
|
||||
while (st % size != 0) st++;
|
||||
void *ret = (void *)st;
|
||||
st += size;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void simple_pgfree(void *ptr) {
|
||||
}
|
||||
|
||||
Context* vm_handler(Event ev, Context *ctx) {
|
||||
switch (ev.event) {
|
||||
case EVENT_YIELD:
|
||||
break;
|
||||
case EVENT_IRQ_TIMER:
|
||||
case EVENT_IRQ_IODEV:
|
||||
printf("==== interrupt (%s) ====\n", ev.msg);
|
||||
break;
|
||||
case EVENT_PAGEFAULT:
|
||||
printf("PF: %x %s%s%s\n",
|
||||
ev.ref,
|
||||
(ev.cause & MMAP_NONE) ? "[not present]" : "",
|
||||
(ev.cause & MMAP_READ) ? "[read fail]" : "",
|
||||
(ev.cause & MMAP_WRITE) ? "[write fail]" : "");
|
||||
break;
|
||||
case EVENT_SYSCALL:
|
||||
iset(1);
|
||||
for (int volatile i = 0; i < 1000000; i++) ;
|
||||
printf("%d ", ctx->GPRx);
|
||||
break;
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
if (first_trap) {
|
||||
first_trap = 0;
|
||||
return uctx;
|
||||
} else {
|
||||
return ctx;
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t code[] = {
|
||||
#ifdef __ARCH_NATIVE
|
||||
0x31, 0xc0, // xor %eax, %eax
|
||||
0x83, 0xc0, 0x01, // add $1, %eax
|
||||
0xff, 0x14, 0x25, 0x00, 0x00, 0x10, 0x00, // call *0x100000
|
||||
0xeb, 0xf4, // jmp 2
|
||||
#else
|
||||
0x31, 0xc0, // xor %eax, %eax
|
||||
0x8d, 0xb6, // lea 0(%esi), %esi
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
0x83, 0xc0, 0x01, // add $1, %eax
|
||||
0xcd, 0x80, // int $0x80
|
||||
0xeb, 0xf9, // jmp 8
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
void vm_test() {
|
||||
if (!strncmp(__ISA__, "x86", 3) == 0 &&
|
||||
!strcmp(__ISA__, "native") == 0) {
|
||||
printf("Not supported architecture.\n");
|
||||
return;
|
||||
}
|
||||
protect(&prot);
|
||||
printf("Protected address space: [%p, %p)\n", prot.area.start, prot.area.end);
|
||||
|
||||
uint8_t *ptr = (void*)((uintptr_t)(prot.area.start) +
|
||||
((uintptr_t)(prot.area.end) - (uintptr_t)(prot.area.start)) / 2);
|
||||
|
||||
void *pg = simple_pgalloc(prot.pgsize);
|
||||
memcpy(pg, code, sizeof(code));
|
||||
|
||||
map(&prot, ptr, pg, MMAP_WRITE | MMAP_READ);
|
||||
printf("Code copied to %p (physical %p) execute\n", ptr, pg);
|
||||
|
||||
static uint8_t stack[4096];
|
||||
uctx = ucontext(&prot, RANGE(stack, stack + sizeof(stack)), ptr);
|
||||
|
||||
iset(1);
|
||||
yield();
|
||||
}
|
1
am-kernels/tests/cpu-tests/.gitignore
vendored
Normal file
1
am-kernels/tests/cpu-tests/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/Makefile.*
|
35
am-kernels/tests/cpu-tests/.result
Normal file
35
am-kernels/tests/cpu-tests/.result
Normal file
|
@ -0,0 +1,35 @@
|
|||
[ fact] [1;32mPASS[0m
|
||||
[ select-sort] [1;32mPASS[0m
|
||||
[ mul-longlong] [1;32mPASS[0m
|
||||
[ to-lower-case] [1;32mPASS[0m
|
||||
[ mersenne] [1;32mPASS[0m
|
||||
[ fib] [1;32mPASS[0m
|
||||
[ crc32] [1;32mPASS[0m
|
||||
[ leap-year] [1;32mPASS[0m
|
||||
[ mov-c] [1;32mPASS[0m
|
||||
[ recursion] [1;32mPASS[0m
|
||||
[ bubble-sort] [1;32mPASS[0m
|
||||
[ add] [1;32mPASS[0m
|
||||
[ add-longlong] [1;32mPASS[0m
|
||||
[ shift] [1;32mPASS[0m
|
||||
[ bit] [1;32mPASS[0m
|
||||
[ min3] [1;32mPASS[0m
|
||||
[ quick-sort] [1;32mPASS[0m
|
||||
[ dummy] [1;32mPASS[0m
|
||||
[ unalign] [1;32mPASS[0m
|
||||
[ movsx] [1;32mPASS[0m
|
||||
[ div] [1;32mPASS[0m
|
||||
[ goldbach] [1;32mPASS[0m
|
||||
[ prime] [1;32mPASS[0m
|
||||
[ pascal] [1;32mPASS[0m
|
||||
[ switch] [1;32mPASS[0m
|
||||
[ max] [1;32mPASS[0m
|
||||
[ sum] [1;32mPASS[0m
|
||||
[ matrix-mul] [1;32mPASS[0m
|
||||
[ hello-str] [1;32mPASS[0m
|
||||
[ sub-longlong] [1;32mPASS[0m
|
||||
[ shuixianhua] [1;32mPASS[0m
|
||||
[ if-else] [1;32mPASS[0m
|
||||
[ load-store] [1;32mPASS[0m
|
||||
[ string] [1;32mPASS[0m
|
||||
[ wanshu] [1;32mPASS[0m
|
3
am-kernels/tests/cpu-tests/CMakeLists.txt
Normal file
3
am-kernels/tests/cpu-tests/CMakeLists.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
|
||||
include_directories(include)
|
||||
add_subdirectory(tests)
|
35
am-kernels/tests/cpu-tests/Makefile
Normal file
35
am-kernels/tests/cpu-tests/Makefile
Normal file
|
@ -0,0 +1,35 @@
|
|||
.PHONY: all run gdb clean latest $(ALL)
|
||||
|
||||
RESULT = .result
|
||||
$(shell > $(RESULT))
|
||||
|
||||
COLOR_RED = \033[1;31m
|
||||
COLOR_GREEN = \033[1;32m
|
||||
COLOR_NONE = \033[0m
|
||||
|
||||
ALL = $(basename $(notdir $(shell find tests/. -name "*.c")))
|
||||
|
||||
all: $(addprefix Makefile., $(ALL))
|
||||
@echo "test list [$(words $(ALL)) item(s)]:" $(ALL)
|
||||
|
||||
$(ALL): %: Makefile.%
|
||||
|
||||
Makefile.%: tests/%.c latest
|
||||
@echo -e "NAME = $*\nSRCS = $<\ninclude $${AM_HOME}/Makefile" > $@
|
||||
@if make -s -f $@ ARCH=$(ARCH) $(MAKECMDGOALS); then \
|
||||
printf "[%14s] $(COLOR_GREEN)PASS$(COLOR_NONE)\n" $* >> $(RESULT); \
|
||||
else \
|
||||
printf "[%14s] $(COLOR_RED)***FAIL***$(COLOR_NONE)\n" $* >> $(RESULT); \
|
||||
fi
|
||||
-@rm -f Makefile.$*
|
||||
|
||||
run: all
|
||||
@cat $(RESULT)
|
||||
@rm $(RESULT)
|
||||
|
||||
gdb: all
|
||||
|
||||
clean:
|
||||
rm -rf Makefile.* build/
|
||||
|
||||
latest:
|
BIN
am-kernels/tests/cpu-tests/build/add-longlong-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/add-longlong-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/add-longlong-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/add-longlong-riscv32-nemu.elf
Executable file
Binary file not shown.
|
@ -0,0 +1,95 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/add-longlong-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 114000ef jal 80000120 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 0f0000ef jal 80000114 <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: fd010113 add sp,sp,-48
|
||||
8000002c: 01612823 sw s6,16(sp)
|
||||
80000030: 00000b17 auipc s6,0x0
|
||||
80000034: 318b0b13 add s6,s6,792 # 80000348 <test_data>
|
||||
80000038: 03212023 sw s2,32(sp)
|
||||
8000003c: 01312e23 sw s3,28(sp)
|
||||
80000040: 01412c23 sw s4,24(sp)
|
||||
80000044: 01512a23 sw s5,20(sp)
|
||||
80000048: 01712623 sw s7,12(sp)
|
||||
8000004c: 02112623 sw ra,44(sp)
|
||||
80000050: 02812423 sw s0,40(sp)
|
||||
80000054: 02912223 sw s1,36(sp)
|
||||
80000058: 01812423 sw s8,8(sp)
|
||||
8000005c: 01912223 sw s9,4(sp)
|
||||
80000060: 00000a97 auipc s5,0x0
|
||||
80000064: 0e8a8a93 add s5,s5,232 # 80000148 <ans>
|
||||
80000068: 000b0993 mv s3,s6
|
||||
8000006c: 00000a13 li s4,0
|
||||
80000070: 00000917 auipc s2,0x0
|
||||
80000074: 31890913 add s2,s2,792 # 80000388 <_bss_start>
|
||||
80000078: 04000b93 li s7,64
|
||||
8000007c: 0009ac83 lw s9,0(s3)
|
||||
80000080: 0049a483 lw s1,4(s3)
|
||||
80000084: 000a8c13 mv s8,s5
|
||||
80000088: 000b0413 mv s0,s6
|
||||
8000008c: 00042783 lw a5,0(s0)
|
||||
80000090: 00442603 lw a2,4(s0)
|
||||
80000094: 004c2703 lw a4,4(s8)
|
||||
80000098: 00fc87b3 add a5,s9,a5
|
||||
8000009c: 000c2503 lw a0,0(s8)
|
||||
800000a0: 0197b6b3 sltu a3,a5,s9
|
||||
800000a4: 00c48633 add a2,s1,a2
|
||||
800000a8: 00c686b3 add a3,a3,a2
|
||||
800000ac: 00f54533 xor a0,a0,a5
|
||||
800000b0: 00d747b3 xor a5,a4,a3
|
||||
800000b4: 00f56533 or a0,a0,a5
|
||||
800000b8: 00153513 seqz a0,a0
|
||||
800000bc: 00840413 add s0,s0,8
|
||||
800000c0: f51ff0ef jal 80000010 <check>
|
||||
800000c4: 008c0c13 add s8,s8,8
|
||||
800000c8: fc8912e3 bne s2,s0,8000008c <main+0x64>
|
||||
800000cc: 008a0a13 add s4,s4,8
|
||||
800000d0: 00898993 add s3,s3,8
|
||||
800000d4: 040a8a93 add s5,s5,64
|
||||
800000d8: fb7a12e3 bne s4,s7,8000007c <main+0x54>
|
||||
800000dc: 02c12083 lw ra,44(sp)
|
||||
800000e0: 02812403 lw s0,40(sp)
|
||||
800000e4: 02412483 lw s1,36(sp)
|
||||
800000e8: 02012903 lw s2,32(sp)
|
||||
800000ec: 01c12983 lw s3,28(sp)
|
||||
800000f0: 01812a03 lw s4,24(sp)
|
||||
800000f4: 01412a83 lw s5,20(sp)
|
||||
800000f8: 01012b03 lw s6,16(sp)
|
||||
800000fc: 00c12b83 lw s7,12(sp)
|
||||
80000100: 00812c03 lw s8,8(sp)
|
||||
80000104: 00412c83 lw s9,4(sp)
|
||||
80000108: 00000513 li a0,0
|
||||
8000010c: 03010113 add sp,sp,48
|
||||
80000110: 00008067 ret
|
||||
|
||||
80000114 <halt>:
|
||||
80000114: 00050513 mv a0,a0
|
||||
80000118: 00100073 ebreak
|
||||
8000011c: 0000006f j 8000011c <halt+0x8>
|
||||
|
||||
80000120 <_trm_init>:
|
||||
80000120: ff010113 add sp,sp,-16
|
||||
80000124: 00000517 auipc a0,0x0
|
||||
80000128: 01c50513 add a0,a0,28 # 80000140 <_etext>
|
||||
8000012c: 00112623 sw ra,12(sp)
|
||||
80000130: ef9ff0ef jal 80000028 <main>
|
||||
80000134: 00050513 mv a0,a0
|
||||
80000138: 00100073 ebreak
|
||||
8000013c: 0000006f j 8000013c <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/add-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/add-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/add-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/add-riscv32-nemu.elf
Executable file
Binary file not shown.
89
am-kernels/tests/cpu-tests/build/add-riscv32-nemu.txt
Normal file
89
am-kernels/tests/cpu-tests/build/add-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,89 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/add-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 0fc000ef jal 80000108 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 0d8000ef jal 800000fc <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: fd010113 add sp,sp,-48
|
||||
8000002c: 01712623 sw s7,12(sp)
|
||||
80000030: 00000b97 auipc s7,0x0
|
||||
80000034: 1fcb8b93 add s7,s7,508 # 8000022c <test_data>
|
||||
80000038: 01312e23 sw s3,28(sp)
|
||||
8000003c: 01412c23 sw s4,24(sp)
|
||||
80000040: 01512a23 sw s5,20(sp)
|
||||
80000044: 01612823 sw s6,16(sp)
|
||||
80000048: 01812423 sw s8,8(sp)
|
||||
8000004c: 02112623 sw ra,44(sp)
|
||||
80000050: 02812423 sw s0,40(sp)
|
||||
80000054: 02912223 sw s1,36(sp)
|
||||
80000058: 03212023 sw s2,32(sp)
|
||||
8000005c: 00000b17 auipc s6,0x0
|
||||
80000060: 0d0b0b13 add s6,s6,208 # 8000012c <ans>
|
||||
80000064: 000b8a93 mv s5,s7
|
||||
80000068: 00000a13 li s4,0
|
||||
8000006c: 00000997 auipc s3,0x0
|
||||
80000070: 1e098993 add s3,s3,480 # 8000024c <_bss_start>
|
||||
80000074: 04000c13 li s8,64
|
||||
80000078: 000aa903 lw s2,0(s5)
|
||||
8000007c: 000b0493 mv s1,s6
|
||||
80000080: 000b8413 mv s0,s7
|
||||
80000084: 00042503 lw a0,0(s0)
|
||||
80000088: 0004a783 lw a5,0(s1)
|
||||
8000008c: 00440413 add s0,s0,4
|
||||
80000090: 00a90533 add a0,s2,a0
|
||||
80000094: 40f50533 sub a0,a0,a5
|
||||
80000098: 00153513 seqz a0,a0
|
||||
8000009c: f75ff0ef jal 80000010 <check>
|
||||
800000a0: 00448493 add s1,s1,4
|
||||
800000a4: fe8990e3 bne s3,s0,80000084 <main+0x5c>
|
||||
800000a8: 00100513 li a0,1
|
||||
800000ac: 008a0a13 add s4,s4,8
|
||||
800000b0: f61ff0ef jal 80000010 <check>
|
||||
800000b4: 004a8a93 add s5,s5,4
|
||||
800000b8: 020b0b13 add s6,s6,32
|
||||
800000bc: fb8a1ee3 bne s4,s8,80000078 <main+0x50>
|
||||
800000c0: 00100513 li a0,1
|
||||
800000c4: f4dff0ef jal 80000010 <check>
|
||||
800000c8: 02c12083 lw ra,44(sp)
|
||||
800000cc: 02812403 lw s0,40(sp)
|
||||
800000d0: 02412483 lw s1,36(sp)
|
||||
800000d4: 02012903 lw s2,32(sp)
|
||||
800000d8: 01c12983 lw s3,28(sp)
|
||||
800000dc: 01812a03 lw s4,24(sp)
|
||||
800000e0: 01412a83 lw s5,20(sp)
|
||||
800000e4: 01012b03 lw s6,16(sp)
|
||||
800000e8: 00c12b83 lw s7,12(sp)
|
||||
800000ec: 00812c03 lw s8,8(sp)
|
||||
800000f0: 00000513 li a0,0
|
||||
800000f4: 03010113 add sp,sp,48
|
||||
800000f8: 00008067 ret
|
||||
|
||||
800000fc <halt>:
|
||||
800000fc: 00050513 mv a0,a0
|
||||
80000100: 00100073 ebreak
|
||||
80000104: 0000006f j 80000104 <halt+0x8>
|
||||
|
||||
80000108 <_trm_init>:
|
||||
80000108: ff010113 add sp,sp,-16
|
||||
8000010c: 00000517 auipc a0,0x0
|
||||
80000110: 01c50513 add a0,a0,28 # 80000128 <_etext>
|
||||
80000114: 00112623 sw ra,12(sp)
|
||||
80000118: f11ff0ef jal 80000028 <main>
|
||||
8000011c: 00050513 mv a0,a0
|
||||
80000120: 00100073 ebreak
|
||||
80000124: 0000006f j 80000124 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/bit-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/bit-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/bit-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/bit-riscv32-nemu.elf
Executable file
Binary file not shown.
156
am-kernels/tests/cpu-tests/build/bit-riscv32-nemu.txt
Normal file
156
am-kernels/tests/cpu-tests/build/bit-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,156 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/bit-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 1f8000ef jal 80000204 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 1d4000ef jal 800001f8 <halt>
|
||||
|
||||
80000028 <getbit>:
|
||||
80000028: 4035d793 sra a5,a1,0x3
|
||||
8000002c: 00f50533 add a0,a0,a5
|
||||
80000030: 00054503 lbu a0,0(a0)
|
||||
80000034: 0075f593 and a1,a1,7
|
||||
80000038: 00100793 li a5,1
|
||||
8000003c: 00b797b3 sll a5,a5,a1
|
||||
80000040: 00f57533 and a0,a0,a5
|
||||
80000044: 00a03533 snez a0,a0
|
||||
80000048: 00008067 ret
|
||||
|
||||
8000004c <setbit>:
|
||||
8000004c: 4035d793 sra a5,a1,0x3
|
||||
80000050: ff010113 add sp,sp,-16
|
||||
80000054: 00f50533 add a0,a0,a5
|
||||
80000058: 00a12623 sw a0,12(sp)
|
||||
8000005c: 00c12783 lw a5,12(sp)
|
||||
80000060: 0075f593 and a1,a1,7
|
||||
80000064: 00100713 li a4,1
|
||||
80000068: 00b71733 sll a4,a4,a1
|
||||
8000006c: 02061063 bnez a2,8000008c <setbit+0x40>
|
||||
80000070: 0007c783 lbu a5,0(a5)
|
||||
80000074: fff74713 not a4,a4
|
||||
80000078: 00e7f7b3 and a5,a5,a4
|
||||
8000007c: 00c12703 lw a4,12(sp)
|
||||
80000080: 00f70023 sb a5,0(a4)
|
||||
80000084: 01010113 add sp,sp,16
|
||||
80000088: 00008067 ret
|
||||
8000008c: 0007c783 lbu a5,0(a5)
|
||||
80000090: 00e7e7b3 or a5,a5,a4
|
||||
80000094: 00c12703 lw a4,12(sp)
|
||||
80000098: 0ff7f793 zext.b a5,a5
|
||||
8000009c: 00f70023 sb a5,0(a4)
|
||||
800000a0: 01010113 add sp,sp,16
|
||||
800000a4: 00008067 ret
|
||||
|
||||
800000a8 <main>:
|
||||
800000a8: fe010113 add sp,sp,-32
|
||||
800000ac: 0aa00793 li a5,170
|
||||
800000b0: 00000593 li a1,0
|
||||
800000b4: 00c10513 add a0,sp,12
|
||||
800000b8: 00112e23 sw ra,28(sp)
|
||||
800000bc: 00f11623 sh a5,12(sp)
|
||||
800000c0: f69ff0ef jal 80000028 <getbit>
|
||||
800000c4: 00154513 xor a0,a0,1
|
||||
800000c8: 0ff57513 zext.b a0,a0
|
||||
800000cc: f45ff0ef jal 80000010 <check>
|
||||
800000d0: 00100593 li a1,1
|
||||
800000d4: 00c10513 add a0,sp,12
|
||||
800000d8: f51ff0ef jal 80000028 <getbit>
|
||||
800000dc: f35ff0ef jal 80000010 <check>
|
||||
800000e0: 00200593 li a1,2
|
||||
800000e4: 00c10513 add a0,sp,12
|
||||
800000e8: f41ff0ef jal 80000028 <getbit>
|
||||
800000ec: 00154513 xor a0,a0,1
|
||||
800000f0: 0ff57513 zext.b a0,a0
|
||||
800000f4: f1dff0ef jal 80000010 <check>
|
||||
800000f8: 00300593 li a1,3
|
||||
800000fc: 00c10513 add a0,sp,12
|
||||
80000100: f29ff0ef jal 80000028 <getbit>
|
||||
80000104: f0dff0ef jal 80000010 <check>
|
||||
80000108: 00400593 li a1,4
|
||||
8000010c: 00c10513 add a0,sp,12
|
||||
80000110: f19ff0ef jal 80000028 <getbit>
|
||||
80000114: 00154513 xor a0,a0,1
|
||||
80000118: 0ff57513 zext.b a0,a0
|
||||
8000011c: ef5ff0ef jal 80000010 <check>
|
||||
80000120: 00500593 li a1,5
|
||||
80000124: 00c10513 add a0,sp,12
|
||||
80000128: f01ff0ef jal 80000028 <getbit>
|
||||
8000012c: ee5ff0ef jal 80000010 <check>
|
||||
80000130: 00600593 li a1,6
|
||||
80000134: 00c10513 add a0,sp,12
|
||||
80000138: ef1ff0ef jal 80000028 <getbit>
|
||||
8000013c: 00154513 xor a0,a0,1
|
||||
80000140: 0ff57513 zext.b a0,a0
|
||||
80000144: ecdff0ef jal 80000010 <check>
|
||||
80000148: 00700593 li a1,7
|
||||
8000014c: 00c10513 add a0,sp,12
|
||||
80000150: ed9ff0ef jal 80000028 <getbit>
|
||||
80000154: ebdff0ef jal 80000010 <check>
|
||||
80000158: 00c10513 add a0,sp,12
|
||||
8000015c: 00100613 li a2,1
|
||||
80000160: 00800593 li a1,8
|
||||
80000164: ee9ff0ef jal 8000004c <setbit>
|
||||
80000168: 00c10513 add a0,sp,12
|
||||
8000016c: 00000613 li a2,0
|
||||
80000170: 00900593 li a1,9
|
||||
80000174: ed9ff0ef jal 8000004c <setbit>
|
||||
80000178: 00c10513 add a0,sp,12
|
||||
8000017c: 00100613 li a2,1
|
||||
80000180: 00a00593 li a1,10
|
||||
80000184: ec9ff0ef jal 8000004c <setbit>
|
||||
80000188: 00c10513 add a0,sp,12
|
||||
8000018c: 00000613 li a2,0
|
||||
80000190: 00b00593 li a1,11
|
||||
80000194: eb9ff0ef jal 8000004c <setbit>
|
||||
80000198: 00c10513 add a0,sp,12
|
||||
8000019c: 00100613 li a2,1
|
||||
800001a0: 00c00593 li a1,12
|
||||
800001a4: ea9ff0ef jal 8000004c <setbit>
|
||||
800001a8: 00c10513 add a0,sp,12
|
||||
800001ac: 00000613 li a2,0
|
||||
800001b0: 00d00593 li a1,13
|
||||
800001b4: e99ff0ef jal 8000004c <setbit>
|
||||
800001b8: 00c10513 add a0,sp,12
|
||||
800001bc: 00100613 li a2,1
|
||||
800001c0: 00e00593 li a1,14
|
||||
800001c4: e89ff0ef jal 8000004c <setbit>
|
||||
800001c8: 00c10513 add a0,sp,12
|
||||
800001cc: 00000613 li a2,0
|
||||
800001d0: 00f00593 li a1,15
|
||||
800001d4: e79ff0ef jal 8000004c <setbit>
|
||||
800001d8: 00d14503 lbu a0,13(sp)
|
||||
800001dc: fab50513 add a0,a0,-85
|
||||
800001e0: 00153513 seqz a0,a0
|
||||
800001e4: e2dff0ef jal 80000010 <check>
|
||||
800001e8: 01c12083 lw ra,28(sp)
|
||||
800001ec: 00000513 li a0,0
|
||||
800001f0: 02010113 add sp,sp,32
|
||||
800001f4: 00008067 ret
|
||||
|
||||
800001f8 <halt>:
|
||||
800001f8: 00050513 mv a0,a0
|
||||
800001fc: 00100073 ebreak
|
||||
80000200: 0000006f j 80000200 <halt+0x8>
|
||||
|
||||
80000204 <_trm_init>:
|
||||
80000204: ff010113 add sp,sp,-16
|
||||
80000208: 00000517 auipc a0,0x0
|
||||
8000020c: 01c50513 add a0,a0,28 # 80000224 <_etext>
|
||||
80000210: 00112623 sw ra,12(sp)
|
||||
80000214: e95ff0ef jal 800000a8 <main>
|
||||
80000218: 00050513 mv a0,a0
|
||||
8000021c: 00100073 ebreak
|
||||
80000220: 0000006f j 80000220 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/bubble-sort-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/bubble-sort-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/bubble-sort-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/bubble-sort-riscv32-nemu.elf
Executable file
Binary file not shown.
|
@ -0,0 +1,94 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/bubble-sort-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 108000ef jal 80000114 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 0e4000ef jal 80000108 <halt>
|
||||
|
||||
80000028 <bubble_sort>:
|
||||
80000028: 01300593 li a1,19
|
||||
8000002c: 00000797 auipc a5,0x0
|
||||
80000030: 10c78793 add a5,a5,268 # 80000138 <a>
|
||||
80000034: 00000713 li a4,0
|
||||
80000038: 0007a683 lw a3,0(a5)
|
||||
8000003c: 0047a603 lw a2,4(a5)
|
||||
80000040: 00170713 add a4,a4,1
|
||||
80000044: 00d65663 bge a2,a3,80000050 <bubble_sort+0x28>
|
||||
80000048: 00c7a023 sw a2,0(a5)
|
||||
8000004c: 00d7a223 sw a3,4(a5)
|
||||
80000050: 00478793 add a5,a5,4
|
||||
80000054: feb742e3 blt a4,a1,80000038 <bubble_sort+0x10>
|
||||
80000058: fff58593 add a1,a1,-1
|
||||
8000005c: fc0598e3 bnez a1,8000002c <bubble_sort+0x4>
|
||||
80000060: 00008067 ret
|
||||
|
||||
80000064 <main>:
|
||||
80000064: fe010113 add sp,sp,-32
|
||||
80000068: 00912a23 sw s1,20(sp)
|
||||
8000006c: 00000497 auipc s1,0x0
|
||||
80000070: 0cc48493 add s1,s1,204 # 80000138 <a>
|
||||
80000074: 00812c23 sw s0,24(sp)
|
||||
80000078: 01212823 sw s2,16(sp)
|
||||
8000007c: 01312623 sw s3,12(sp)
|
||||
80000080: 00112e23 sw ra,28(sp)
|
||||
80000084: 00048913 mv s2,s1
|
||||
80000088: fa1ff0ef jal 80000028 <bubble_sort>
|
||||
8000008c: 00000413 li s0,0
|
||||
80000090: 01400993 li s3,20
|
||||
80000094: 00092503 lw a0,0(s2)
|
||||
80000098: 00490913 add s2,s2,4
|
||||
8000009c: 40850533 sub a0,a0,s0
|
||||
800000a0: 00153513 seqz a0,a0
|
||||
800000a4: 00140413 add s0,s0,1
|
||||
800000a8: f69ff0ef jal 80000010 <check>
|
||||
800000ac: ff3414e3 bne s0,s3,80000094 <main+0x30>
|
||||
800000b0: 00100513 li a0,1
|
||||
800000b4: f5dff0ef jal 80000010 <check>
|
||||
800000b8: 00000413 li s0,0
|
||||
800000bc: f6dff0ef jal 80000028 <bubble_sort>
|
||||
800000c0: 01400913 li s2,20
|
||||
800000c4: 0004a503 lw a0,0(s1)
|
||||
800000c8: 00448493 add s1,s1,4
|
||||
800000cc: 40850533 sub a0,a0,s0
|
||||
800000d0: 00153513 seqz a0,a0
|
||||
800000d4: 00140413 add s0,s0,1
|
||||
800000d8: f39ff0ef jal 80000010 <check>
|
||||
800000dc: ff2414e3 bne s0,s2,800000c4 <main+0x60>
|
||||
800000e0: 00100513 li a0,1
|
||||
800000e4: f2dff0ef jal 80000010 <check>
|
||||
800000e8: 01c12083 lw ra,28(sp)
|
||||
800000ec: 01812403 lw s0,24(sp)
|
||||
800000f0: 01412483 lw s1,20(sp)
|
||||
800000f4: 01012903 lw s2,16(sp)
|
||||
800000f8: 00c12983 lw s3,12(sp)
|
||||
800000fc: 00000513 li a0,0
|
||||
80000100: 02010113 add sp,sp,32
|
||||
80000104: 00008067 ret
|
||||
|
||||
80000108 <halt>:
|
||||
80000108: 00050513 mv a0,a0
|
||||
8000010c: 00100073 ebreak
|
||||
80000110: 0000006f j 80000110 <halt+0x8>
|
||||
|
||||
80000114 <_trm_init>:
|
||||
80000114: ff010113 add sp,sp,-16
|
||||
80000118: 00000517 auipc a0,0x0
|
||||
8000011c: 01c50513 add a0,a0,28 # 80000134 <_etext>
|
||||
80000120: 00112623 sw ra,12(sp)
|
||||
80000124: f41ff0ef jal 80000064 <main>
|
||||
80000128: 00050513 mv a0,a0
|
||||
8000012c: 00100073 ebreak
|
||||
80000130: 0000006f j 80000130 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/crc32-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/crc32-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/crc32-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/crc32-riscv32-nemu.elf
Executable file
Binary file not shown.
95
am-kernels/tests/cpu-tests/build/crc32-riscv32-nemu.txt
Normal file
95
am-kernels/tests/cpu-tests/build/crc32-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,95 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/crc32-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 10c000ef jal 80000118 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 0e8000ef jal 8000010c <halt>
|
||||
|
||||
80000028 <rc_crc32>:
|
||||
80000028: 00000e97 auipc t4,0x0
|
||||
8000002c: 540e8e93 add t4,t4,1344 # 80000568 <have_table.1>
|
||||
80000030: 000ea883 lw a7,0(t4)
|
||||
80000034: 04089a63 bnez a7,80000088 <rc_crc32+0x60>
|
||||
80000038: edb88837 lui a6,0xedb88
|
||||
8000003c: 00000317 auipc t1,0x0
|
||||
80000040: 12c30313 add t1,t1,300 # 80000168 <table.0>
|
||||
80000044: 32080813 add a6,a6,800 # edb88320 <_end+0x6db7f320>
|
||||
80000048: 10000e13 li t3,256
|
||||
8000004c: 00088713 mv a4,a7
|
||||
80000050: 00800693 li a3,8
|
||||
80000054: 00177793 and a5,a4,1
|
||||
80000058: 40f007b3 neg a5,a5
|
||||
8000005c: 0107f7b3 and a5,a5,a6
|
||||
80000060: 00175713 srl a4,a4,0x1
|
||||
80000064: fff68693 add a3,a3,-1
|
||||
80000068: 00e7c733 xor a4,a5,a4
|
||||
8000006c: fe0694e3 bnez a3,80000054 <rc_crc32+0x2c>
|
||||
80000070: 00e32023 sw a4,0(t1)
|
||||
80000074: 00188893 add a7,a7,1
|
||||
80000078: 00430313 add t1,t1,4
|
||||
8000007c: fdc898e3 bne a7,t3,8000004c <rc_crc32+0x24>
|
||||
80000080: 00100793 li a5,1
|
||||
80000084: 00fea023 sw a5,0(t4)
|
||||
80000088: 00c58633 add a2,a1,a2
|
||||
8000008c: fff54713 not a4,a0
|
||||
80000090: 02c5fc63 bgeu a1,a2,800000c8 <rc_crc32+0xa0>
|
||||
80000094: 00000517 auipc a0,0x0
|
||||
80000098: 0d450513 add a0,a0,212 # 80000168 <table.0>
|
||||
8000009c: 0005c683 lbu a3,0(a1)
|
||||
800000a0: 0ff77793 zext.b a5,a4
|
||||
800000a4: 00158593 add a1,a1,1
|
||||
800000a8: 00d7c7b3 xor a5,a5,a3
|
||||
800000ac: 00279793 sll a5,a5,0x2
|
||||
800000b0: 00f507b3 add a5,a0,a5
|
||||
800000b4: 0007a783 lw a5,0(a5)
|
||||
800000b8: 00875713 srl a4,a4,0x8
|
||||
800000bc: 00f74733 xor a4,a4,a5
|
||||
800000c0: fcb61ee3 bne a2,a1,8000009c <rc_crc32+0x74>
|
||||
800000c4: fff74513 not a0,a4
|
||||
800000c8: 00008067 ret
|
||||
|
||||
800000cc <main>:
|
||||
800000cc: ff010113 add sp,sp,-16
|
||||
800000d0: 02b00613 li a2,43
|
||||
800000d4: 00000597 auipc a1,0x0
|
||||
800000d8: 06458593 add a1,a1,100 # 80000138 <_etext>
|
||||
800000dc: 00000513 li a0,0
|
||||
800000e0: 00112623 sw ra,12(sp)
|
||||
800000e4: f45ff0ef jal 80000028 <rc_crc32>
|
||||
800000e8: beb067b7 lui a5,0xbeb06
|
||||
800000ec: cc778793 add a5,a5,-825 # beb05cc7 <_end+0x3eafccc7>
|
||||
800000f0: 00f50533 add a0,a0,a5
|
||||
800000f4: 00153513 seqz a0,a0
|
||||
800000f8: f19ff0ef jal 80000010 <check>
|
||||
800000fc: 00c12083 lw ra,12(sp)
|
||||
80000100: 00000513 li a0,0
|
||||
80000104: 01010113 add sp,sp,16
|
||||
80000108: 00008067 ret
|
||||
|
||||
8000010c <halt>:
|
||||
8000010c: 00050513 mv a0,a0
|
||||
80000110: 00100073 ebreak
|
||||
80000114: 0000006f j 80000114 <halt+0x8>
|
||||
|
||||
80000118 <_trm_init>:
|
||||
80000118: ff010113 add sp,sp,-16
|
||||
8000011c: 00000517 auipc a0,0x0
|
||||
80000120: 04850513 add a0,a0,72 # 80000164 <mainargs>
|
||||
80000124: 00112623 sw ra,12(sp)
|
||||
80000128: fa5ff0ef jal 800000cc <main>
|
||||
8000012c: 00050513 mv a0,a0
|
||||
80000130: 00100073 ebreak
|
||||
80000134: 0000006f j 80000134 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/div-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/div-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/div-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/div-riscv32-nemu.elf
Executable file
Binary file not shown.
90
am-kernels/tests/cpu-tests/build/div-riscv32-nemu.txt
Normal file
90
am-kernels/tests/cpu-tests/build/div-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,90 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/div-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 100000ef jal 8000010c <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 0dc000ef jal 80000100 <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: ff010113 add sp,sp,-16
|
||||
8000002c: 00912223 sw s1,4(sp)
|
||||
80000030: 00000497 auipc s1,0x0
|
||||
80000034: 10048493 add s1,s1,256 # 80000130 <a>
|
||||
80000038: 00112623 sw ra,12(sp)
|
||||
8000003c: 00812423 sw s0,8(sp)
|
||||
80000040: 01212023 sw s2,0(sp)
|
||||
80000044: 00048713 mv a4,s1
|
||||
80000048: 00000793 li a5,0
|
||||
8000004c: 00a00693 li a3,10
|
||||
80000050: 00f72023 sw a5,0(a4)
|
||||
80000054: 00178793 add a5,a5,1
|
||||
80000058: 00470713 add a4,a4,4
|
||||
8000005c: fed79ae3 bne a5,a3,80000050 <main+0x28>
|
||||
80000060: 00000597 auipc a1,0x0
|
||||
80000064: 0f858593 add a1,a1,248 # 80000158 <a+0x28>
|
||||
80000068: 00000617 auipc a2,0x0
|
||||
8000006c: 0c860613 add a2,a2,200 # 80000130 <a>
|
||||
80000070: 00b00693 li a3,11
|
||||
80000074: 00062703 lw a4,0(a2)
|
||||
80000078: 00100793 li a5,1
|
||||
8000007c: 02f70733 mul a4,a4,a5
|
||||
80000080: 00178793 add a5,a5,1
|
||||
80000084: fed79ce3 bne a5,a3,8000007c <main+0x54>
|
||||
80000088: 00e62023 sw a4,0(a2)
|
||||
8000008c: 00460613 add a2,a2,4
|
||||
80000090: feb612e3 bne a2,a1,80000074 <main+0x4c>
|
||||
80000094: 00000617 auipc a2,0x0
|
||||
80000098: 09c60613 add a2,a2,156 # 80000130 <a>
|
||||
8000009c: 00b00693 li a3,11
|
||||
800000a0: 00062703 lw a4,0(a2)
|
||||
800000a4: 00100793 li a5,1
|
||||
800000a8: 02f74733 div a4,a4,a5
|
||||
800000ac: 00178793 add a5,a5,1
|
||||
800000b0: fed79ce3 bne a5,a3,800000a8 <main+0x80>
|
||||
800000b4: 00e62023 sw a4,0(a2)
|
||||
800000b8: 00460613 add a2,a2,4
|
||||
800000bc: feb612e3 bne a2,a1,800000a0 <main+0x78>
|
||||
800000c0: 00000413 li s0,0
|
||||
800000c4: 00a00913 li s2,10
|
||||
800000c8: 0004a503 lw a0,0(s1)
|
||||
800000cc: 00448493 add s1,s1,4
|
||||
800000d0: 40850533 sub a0,a0,s0
|
||||
800000d4: 00153513 seqz a0,a0
|
||||
800000d8: 00140413 add s0,s0,1
|
||||
800000dc: f35ff0ef jal 80000010 <check>
|
||||
800000e0: ff2414e3 bne s0,s2,800000c8 <main+0xa0>
|
||||
800000e4: 00c12083 lw ra,12(sp)
|
||||
800000e8: 00812403 lw s0,8(sp)
|
||||
800000ec: 00412483 lw s1,4(sp)
|
||||
800000f0: 00012903 lw s2,0(sp)
|
||||
800000f4: 00000513 li a0,0
|
||||
800000f8: 01010113 add sp,sp,16
|
||||
800000fc: 00008067 ret
|
||||
|
||||
80000100 <halt>:
|
||||
80000100: 00050513 mv a0,a0
|
||||
80000104: 00100073 ebreak
|
||||
80000108: 0000006f j 80000108 <halt+0x8>
|
||||
|
||||
8000010c <_trm_init>:
|
||||
8000010c: ff010113 add sp,sp,-16
|
||||
80000110: 00000517 auipc a0,0x0
|
||||
80000114: 01c50513 add a0,a0,28 # 8000012c <_etext>
|
||||
80000118: 00112623 sw ra,12(sp)
|
||||
8000011c: f0dff0ef jal 80000028 <main>
|
||||
80000120: 00050513 mv a0,a0
|
||||
80000124: 00100073 ebreak
|
||||
80000128: 0000006f j 80000128 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/dummy-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/dummy-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/dummy-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/dummy-riscv32-nemu.elf
Executable file
Binary file not shown.
25
am-kernels/tests/cpu-tests/build/dummy-riscv32-nemu.txt
Normal file
25
am-kernels/tests/cpu-tests/build/dummy-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/dummy-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 00c000ef jal 80000018 <_trm_init>
|
||||
|
||||
80000010 <main>:
|
||||
80000010: 00000513 li a0,0
|
||||
80000014: 00008067 ret
|
||||
|
||||
80000018 <_trm_init>:
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00000517 auipc a0,0x0
|
||||
80000020: 01c50513 add a0,a0,28 # 80000038 <_etext>
|
||||
80000024: 00112623 sw ra,12(sp)
|
||||
80000028: fe9ff0ef jal 80000010 <main>
|
||||
8000002c: 00050513 mv a0,a0
|
||||
80000030: 00100073 ebreak
|
||||
80000034: 0000006f j 80000034 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/dummy-riscv32e-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/dummy-riscv32e-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/dummy-riscv32e-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/dummy-riscv32e-nemu.elf
Executable file
Binary file not shown.
25
am-kernels/tests/cpu-tests/build/dummy-riscv32e-nemu.txt
Normal file
25
am-kernels/tests/cpu-tests/build/dummy-riscv32e-nemu.txt
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/dummy-riscv32e-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 00c000ef jal 80000018 <_trm_init>
|
||||
|
||||
80000010 <main>:
|
||||
80000010: 00000513 li a0,0
|
||||
80000014: 00008067 ret
|
||||
|
||||
80000018 <_trm_init>:
|
||||
80000018: ff410113 add sp,sp,-12
|
||||
8000001c: 00000517 auipc a0,0x0
|
||||
80000020: 01c50513 add a0,a0,28 # 80000038 <_etext>
|
||||
80000024: 00112423 sw ra,8(sp)
|
||||
80000028: fe9ff0ef jal 80000010 <main>
|
||||
8000002c: 00050513 mv a0,a0
|
||||
80000030: 00100073 ebreak
|
||||
80000034: 0000006f j 80000034 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/fact-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/fact-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/fact-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/fact-riscv32-nemu.elf
Executable file
Binary file not shown.
84
am-kernels/tests/cpu-tests/build/fact-riscv32-nemu.txt
Normal file
84
am-kernels/tests/cpu-tests/build/fact-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,84 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/fact-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 0e8000ef jal 800000f4 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 0c4000ef jal 800000e8 <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: fe010113 add sp,sp,-32
|
||||
8000002c: 00812c23 sw s0,24(sp)
|
||||
80000030: 00912a23 sw s1,20(sp)
|
||||
80000034: 01212823 sw s2,16(sp)
|
||||
80000038: 01312623 sw s3,12(sp)
|
||||
8000003c: 01412423 sw s4,8(sp)
|
||||
80000040: 00112e23 sw ra,28(sp)
|
||||
80000044: 00000997 auipc s3,0x0
|
||||
80000048: 10898993 add s3,s3,264 # 8000014c <f>
|
||||
8000004c: 00000917 auipc s2,0x0
|
||||
80000050: 0cc90913 add s2,s2,204 # 80000118 <ans>
|
||||
80000054: 00000493 li s1,0
|
||||
80000058: 00100413 li s0,1
|
||||
8000005c: 00d00a13 li s4,13
|
||||
80000060: 06945263 bge s0,s1,800000c4 <main+0x9c>
|
||||
80000064: 00048793 mv a5,s1
|
||||
80000068: 00100713 li a4,1
|
||||
8000006c: 00078693 mv a3,a5
|
||||
80000070: fff78793 add a5,a5,-1
|
||||
80000074: 02d70733 mul a4,a4,a3
|
||||
80000078: fe879ae3 bne a5,s0,8000006c <main+0x44>
|
||||
8000007c: 00092503 lw a0,0(s2)
|
||||
80000080: 00e9a023 sw a4,0(s3)
|
||||
80000084: 00148493 add s1,s1,1
|
||||
80000088: 40e50533 sub a0,a0,a4
|
||||
8000008c: 00153513 seqz a0,a0
|
||||
80000090: f81ff0ef jal 80000010 <check>
|
||||
80000094: 00498993 add s3,s3,4
|
||||
80000098: 00490913 add s2,s2,4
|
||||
8000009c: fd4492e3 bne s1,s4,80000060 <main+0x38>
|
||||
800000a0: 01c12083 lw ra,28(sp)
|
||||
800000a4: 01812403 lw s0,24(sp)
|
||||
800000a8: 01412483 lw s1,20(sp)
|
||||
800000ac: 01012903 lw s2,16(sp)
|
||||
800000b0: 00c12983 lw s3,12(sp)
|
||||
800000b4: 00812a03 lw s4,8(sp)
|
||||
800000b8: 00000513 li a0,0
|
||||
800000bc: 02010113 add sp,sp,32
|
||||
800000c0: 00008067 ret
|
||||
800000c4: 00092503 lw a0,0(s2)
|
||||
800000c8: 0089a023 sw s0,0(s3)
|
||||
800000cc: 00148493 add s1,s1,1
|
||||
800000d0: fff50513 add a0,a0,-1
|
||||
800000d4: 00153513 seqz a0,a0
|
||||
800000d8: f39ff0ef jal 80000010 <check>
|
||||
800000dc: 00498993 add s3,s3,4
|
||||
800000e0: 00490913 add s2,s2,4
|
||||
800000e4: f7dff06f j 80000060 <main+0x38>
|
||||
|
||||
800000e8 <halt>:
|
||||
800000e8: 00050513 mv a0,a0
|
||||
800000ec: 00100073 ebreak
|
||||
800000f0: 0000006f j 800000f0 <halt+0x8>
|
||||
|
||||
800000f4 <_trm_init>:
|
||||
800000f4: ff010113 add sp,sp,-16
|
||||
800000f8: 00000517 auipc a0,0x0
|
||||
800000fc: 01c50513 add a0,a0,28 # 80000114 <_etext>
|
||||
80000100: 00112623 sw ra,12(sp)
|
||||
80000104: f25ff0ef jal 80000028 <main>
|
||||
80000108: 00050513 mv a0,a0
|
||||
8000010c: 00100073 ebreak
|
||||
80000110: 0000006f j 80000110 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/fib-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/fib-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/fib-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/fib-riscv32-nemu.elf
Executable file
Binary file not shown.
67
am-kernels/tests/cpu-tests/build/fib-riscv32-nemu.txt
Normal file
67
am-kernels/tests/cpu-tests/build/fib-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,67 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/fib-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 0a4000ef jal 800000b0 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 080000ef jal 800000a4 <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: ff010113 add sp,sp,-16
|
||||
8000002c: 00812423 sw s0,8(sp)
|
||||
80000030: 00912223 sw s1,4(sp)
|
||||
80000034: 01212023 sw s2,0(sp)
|
||||
80000038: 00112623 sw ra,12(sp)
|
||||
8000003c: 00000417 auipc s0,0x0
|
||||
80000040: 13840413 add s0,s0,312 # 80000174 <fib>
|
||||
80000044: 00000497 auipc s1,0x0
|
||||
80000048: 09848493 add s1,s1,152 # 800000dc <ans+0x8>
|
||||
8000004c: 00000917 auipc s2,0x0
|
||||
80000050: 1c090913 add s2,s2,448 # 8000020c <fib+0x98>
|
||||
80000054: 00042703 lw a4,0(s0)
|
||||
80000058: 00442783 lw a5,4(s0)
|
||||
8000005c: 0004a503 lw a0,0(s1)
|
||||
80000060: 00440413 add s0,s0,4
|
||||
80000064: 00e787b3 add a5,a5,a4
|
||||
80000068: 40f50533 sub a0,a0,a5
|
||||
8000006c: 00f42223 sw a5,4(s0)
|
||||
80000070: 00153513 seqz a0,a0
|
||||
80000074: f9dff0ef jal 80000010 <check>
|
||||
80000078: 00448493 add s1,s1,4
|
||||
8000007c: fd241ce3 bne s0,s2,80000054 <main+0x2c>
|
||||
80000080: 00100513 li a0,1
|
||||
80000084: f8dff0ef jal 80000010 <check>
|
||||
80000088: 00c12083 lw ra,12(sp)
|
||||
8000008c: 00812403 lw s0,8(sp)
|
||||
80000090: 00412483 lw s1,4(sp)
|
||||
80000094: 00012903 lw s2,0(sp)
|
||||
80000098: 00000513 li a0,0
|
||||
8000009c: 01010113 add sp,sp,16
|
||||
800000a0: 00008067 ret
|
||||
|
||||
800000a4 <halt>:
|
||||
800000a4: 00050513 mv a0,a0
|
||||
800000a8: 00100073 ebreak
|
||||
800000ac: 0000006f j 800000ac <halt+0x8>
|
||||
|
||||
800000b0 <_trm_init>:
|
||||
800000b0: ff010113 add sp,sp,-16
|
||||
800000b4: 00000517 auipc a0,0x0
|
||||
800000b8: 01c50513 add a0,a0,28 # 800000d0 <_etext>
|
||||
800000bc: 00112623 sw ra,12(sp)
|
||||
800000c0: f69ff0ef jal 80000028 <main>
|
||||
800000c4: 00050513 mv a0,a0
|
||||
800000c8: 00100073 ebreak
|
||||
800000cc: 0000006f j 800000cc <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/goldbach-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/goldbach-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/goldbach-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/goldbach-riscv32-nemu.elf
Executable file
Binary file not shown.
99
am-kernels/tests/cpu-tests/build/goldbach-riscv32-nemu.txt
Normal file
99
am-kernels/tests/cpu-tests/build/goldbach-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,99 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/goldbach-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 11c000ef jal 80000128 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 0f8000ef jal 8000011c <halt>
|
||||
|
||||
80000028 <goldbach>:
|
||||
80000028: 00200793 li a5,2
|
||||
8000002c: 00050813 mv a6,a0
|
||||
80000030: 08a7d863 bge a5,a0,800000c0 <goldbach+0x98>
|
||||
80000034: ffe50713 add a4,a0,-2
|
||||
80000038: 00100793 li a5,1
|
||||
8000003c: 00000513 li a0,0
|
||||
80000040: 06f70e63 beq a4,a5,800000bc <goldbach+0x94>
|
||||
80000044: 00070593 mv a1,a4
|
||||
80000048: 00200693 li a3,2
|
||||
8000004c: 00200313 li t1,2
|
||||
80000050: 00100893 li a7,1
|
||||
80000054: 06670a63 beq a4,t1,800000c8 <goldbach+0xa0>
|
||||
80000058: 00177513 and a0,a4,1
|
||||
8000005c: 00200793 li a5,2
|
||||
80000060: 00051863 bnez a0,80000070 <goldbach+0x48>
|
||||
80000064: 0200006f j 80000084 <goldbach+0x5c>
|
||||
80000068: 02f76633 rem a2,a4,a5
|
||||
8000006c: 00060c63 beqz a2,80000084 <goldbach+0x5c>
|
||||
80000070: 00178793 add a5,a5,1
|
||||
80000074: fee79ae3 bne a5,a4,80000068 <goldbach+0x40>
|
||||
80000078: 00008067 ret
|
||||
8000007c: 00058713 mv a4,a1
|
||||
80000080: fcb8cae3 blt a7,a1,80000054 <goldbach+0x2c>
|
||||
80000084: 00068613 mv a2,a3
|
||||
80000088: 00168693 add a3,a3,1
|
||||
8000008c: fff58593 add a1,a1,-1
|
||||
80000090: 02d80863 beq a6,a3,800000c0 <goldbach+0x98>
|
||||
80000094: 0016f793 and a5,a3,1
|
||||
80000098: fe0786e3 beqz a5,80000084 <goldbach+0x5c>
|
||||
8000009c: 00200793 li a5,2
|
||||
800000a0: 00c0006f j 800000ac <goldbach+0x84>
|
||||
800000a4: 02f6e733 rem a4,a3,a5
|
||||
800000a8: fc070ee3 beqz a4,80000084 <goldbach+0x5c>
|
||||
800000ac: 00078713 mv a4,a5
|
||||
800000b0: 00178793 add a5,a5,1
|
||||
800000b4: fec718e3 bne a4,a2,800000a4 <goldbach+0x7c>
|
||||
800000b8: fc5ff06f j 8000007c <goldbach+0x54>
|
||||
800000bc: 00008067 ret
|
||||
800000c0: 00000513 li a0,0
|
||||
800000c4: 00008067 ret
|
||||
800000c8: 00100513 li a0,1
|
||||
800000cc: 00008067 ret
|
||||
|
||||
800000d0 <main>:
|
||||
800000d0: ff010113 add sp,sp,-16
|
||||
800000d4: 00812423 sw s0,8(sp)
|
||||
800000d8: 00912223 sw s1,4(sp)
|
||||
800000dc: 00112623 sw ra,12(sp)
|
||||
800000e0: 00400413 li s0,4
|
||||
800000e4: 02000493 li s1,32
|
||||
800000e8: 00040513 mv a0,s0
|
||||
800000ec: f3dff0ef jal 80000028 <goldbach>
|
||||
800000f0: fff50513 add a0,a0,-1
|
||||
800000f4: 00153513 seqz a0,a0
|
||||
800000f8: 00240413 add s0,s0,2
|
||||
800000fc: f15ff0ef jal 80000010 <check>
|
||||
80000100: fe9414e3 bne s0,s1,800000e8 <main+0x18>
|
||||
80000104: 00c12083 lw ra,12(sp)
|
||||
80000108: 00812403 lw s0,8(sp)
|
||||
8000010c: 00412483 lw s1,4(sp)
|
||||
80000110: 00000513 li a0,0
|
||||
80000114: 01010113 add sp,sp,16
|
||||
80000118: 00008067 ret
|
||||
|
||||
8000011c <halt>:
|
||||
8000011c: 00050513 mv a0,a0
|
||||
80000120: 00100073 ebreak
|
||||
80000124: 0000006f j 80000124 <halt+0x8>
|
||||
|
||||
80000128 <_trm_init>:
|
||||
80000128: ff010113 add sp,sp,-16
|
||||
8000012c: 00000517 auipc a0,0x0
|
||||
80000130: 01c50513 add a0,a0,28 # 80000148 <_etext>
|
||||
80000134: 00112623 sw ra,12(sp)
|
||||
80000138: f99ff0ef jal 800000d0 <main>
|
||||
8000013c: 00050513 mv a0,a0
|
||||
80000140: 00100073 ebreak
|
||||
80000144: 0000006f j 80000144 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/hello-str-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/hello-str-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/hello-str-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/hello-str-riscv32-nemu.elf
Executable file
Binary file not shown.
153
am-kernels/tests/cpu-tests/build/hello-str-riscv32-nemu.txt
Normal file
153
am-kernels/tests/cpu-tests/build/hello-str-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,153 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/hello-str-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 0fc000ef jal 80000108 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 0d8000ef jal 800000fc <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: ff010113 add sp,sp,-16
|
||||
8000002c: 00000617 auipc a2,0x0
|
||||
80000030: 1e460613 add a2,a2,484 # 80000210 <_etext>
|
||||
80000034: 00000597 auipc a1,0x0
|
||||
80000038: 1ec58593 add a1,a1,492 # 80000220 <_etext+0x10>
|
||||
8000003c: 00000517 auipc a0,0x0
|
||||
80000040: 36050513 add a0,a0,864 # 8000039c <buf>
|
||||
80000044: 00112623 sw ra,12(sp)
|
||||
80000048: 0e0000ef jal 80000128 <sprintf>
|
||||
8000004c: 00000597 auipc a1,0x0
|
||||
80000050: 1c458593 add a1,a1,452 # 80000210 <_etext>
|
||||
80000054: 00000517 auipc a0,0x0
|
||||
80000058: 34850513 add a0,a0,840 # 8000039c <buf>
|
||||
8000005c: 14c000ef jal 800001a8 <strcmp>
|
||||
80000060: 00153513 seqz a0,a0
|
||||
80000064: fadff0ef jal 80000010 <check>
|
||||
80000068: 00200713 li a4,2
|
||||
8000006c: 00100693 li a3,1
|
||||
80000070: 00100613 li a2,1
|
||||
80000074: 00000597 auipc a1,0x0
|
||||
80000078: 1b058593 add a1,a1,432 # 80000224 <_etext+0x14>
|
||||
8000007c: 00000517 auipc a0,0x0
|
||||
80000080: 32050513 add a0,a0,800 # 8000039c <buf>
|
||||
80000084: 0a4000ef jal 80000128 <sprintf>
|
||||
80000088: 00000597 auipc a1,0x0
|
||||
8000008c: 1ac58593 add a1,a1,428 # 80000234 <_etext+0x24>
|
||||
80000090: 00000517 auipc a0,0x0
|
||||
80000094: 30c50513 add a0,a0,780 # 8000039c <buf>
|
||||
80000098: 110000ef jal 800001a8 <strcmp>
|
||||
8000009c: 00153513 seqz a0,a0
|
||||
800000a0: f71ff0ef jal 80000010 <check>
|
||||
800000a4: 00c00713 li a4,12
|
||||
800000a8: 00a00693 li a3,10
|
||||
800000ac: 00200613 li a2,2
|
||||
800000b0: 00000597 auipc a1,0x0
|
||||
800000b4: 17458593 add a1,a1,372 # 80000224 <_etext+0x14>
|
||||
800000b8: 00000517 auipc a0,0x0
|
||||
800000bc: 2e450513 add a0,a0,740 # 8000039c <buf>
|
||||
800000c0: 068000ef jal 80000128 <sprintf>
|
||||
800000c4: 00000597 auipc a1,0x0
|
||||
800000c8: 17c58593 add a1,a1,380 # 80000240 <_etext+0x30>
|
||||
800000cc: 00000517 auipc a0,0x0
|
||||
800000d0: 2d050513 add a0,a0,720 # 8000039c <buf>
|
||||
800000d4: 0d4000ef jal 800001a8 <strcmp>
|
||||
800000d8: 00153513 seqz a0,a0
|
||||
800000dc: f35ff0ef jal 80000010 <check>
|
||||
800000e0: 00c12083 lw ra,12(sp)
|
||||
800000e4: 00000513 li a0,0
|
||||
800000e8: 01010113 add sp,sp,16
|
||||
800000ec: 00008067 ret
|
||||
|
||||
800000f0 <putch>:
|
||||
800000f0: a00007b7 lui a5,0xa0000
|
||||
800000f4: 3ea78c23 sb a0,1016(a5) # a00003f8 <_end+0x1fff73f8>
|
||||
800000f8: 00008067 ret
|
||||
|
||||
800000fc <halt>:
|
||||
800000fc: 00050513 mv a0,a0
|
||||
80000100: 00100073 ebreak
|
||||
80000104: 0000006f j 80000104 <halt+0x8>
|
||||
|
||||
80000108 <_trm_init>:
|
||||
80000108: ff010113 add sp,sp,-16
|
||||
8000010c: 00000517 auipc a0,0x0
|
||||
80000110: 28c50513 add a0,a0,652 # 80000398 <mainargs>
|
||||
80000114: 00112623 sw ra,12(sp)
|
||||
80000118: f11ff0ef jal 80000028 <main>
|
||||
8000011c: 00050513 mv a0,a0
|
||||
80000120: 00100073 ebreak
|
||||
80000124: 0000006f j 80000124 <_trm_init+0x1c>
|
||||
|
||||
80000128 <sprintf>:
|
||||
80000128: fd010113 add sp,sp,-48
|
||||
8000012c: 00812423 sw s0,8(sp)
|
||||
80000130: 00112623 sw ra,12(sp)
|
||||
80000134: 00c12c23 sw a2,24(sp)
|
||||
80000138: 00d12e23 sw a3,28(sp)
|
||||
8000013c: 02e12023 sw a4,32(sp)
|
||||
80000140: 02f12223 sw a5,36(sp)
|
||||
80000144: 03012423 sw a6,40(sp)
|
||||
80000148: 03112623 sw a7,44(sp)
|
||||
8000014c: 00000417 auipc s0,0x0
|
||||
80000150: 10440413 add s0,s0,260 # 80000250 <_etext+0x40>
|
||||
80000154: 04100513 li a0,65
|
||||
80000158: f99ff0ef jal 800000f0 <putch>
|
||||
8000015c: 00144503 lbu a0,1(s0)
|
||||
80000160: 00140413 add s0,s0,1
|
||||
80000164: fe051ae3 bnez a0,80000158 <sprintf+0x30>
|
||||
80000168: 00000417 auipc s0,0x0
|
||||
8000016c: 0f440413 add s0,s0,244 # 8000025c <_etext+0x4c>
|
||||
80000170: 04e00513 li a0,78
|
||||
80000174: f7dff0ef jal 800000f0 <putch>
|
||||
80000178: 00144503 lbu a0,1(s0)
|
||||
8000017c: 00140413 add s0,s0,1
|
||||
80000180: fe051ae3 bnez a0,80000174 <sprintf+0x4c>
|
||||
80000184: 00000417 auipc s0,0x0
|
||||
80000188: 13040413 add s0,s0,304 # 800002b4 <_etext+0xa4>
|
||||
8000018c: 02000513 li a0,32
|
||||
80000190: f61ff0ef jal 800000f0 <putch>
|
||||
80000194: 00144503 lbu a0,1(s0)
|
||||
80000198: 00140413 add s0,s0,1
|
||||
8000019c: fe051ae3 bnez a0,80000190 <sprintf+0x68>
|
||||
800001a0: 00100513 li a0,1
|
||||
800001a4: f59ff0ef jal 800000fc <halt>
|
||||
|
||||
800001a8 <strcmp>:
|
||||
800001a8: ff010113 add sp,sp,-16
|
||||
800001ac: 00812423 sw s0,8(sp)
|
||||
800001b0: 00112623 sw ra,12(sp)
|
||||
800001b4: 00000417 auipc s0,0x0
|
||||
800001b8: 09c40413 add s0,s0,156 # 80000250 <_etext+0x40>
|
||||
800001bc: 04100513 li a0,65
|
||||
800001c0: f31ff0ef jal 800000f0 <putch>
|
||||
800001c4: 00144503 lbu a0,1(s0)
|
||||
800001c8: 00140413 add s0,s0,1
|
||||
800001cc: fe051ae3 bnez a0,800001c0 <strcmp+0x18>
|
||||
800001d0: 00000417 auipc s0,0x0
|
||||
800001d4: 08c40413 add s0,s0,140 # 8000025c <_etext+0x4c>
|
||||
800001d8: 04e00513 li a0,78
|
||||
800001dc: f15ff0ef jal 800000f0 <putch>
|
||||
800001e0: 00144503 lbu a0,1(s0)
|
||||
800001e4: 00140413 add s0,s0,1
|
||||
800001e8: fe051ae3 bnez a0,800001dc <strcmp+0x34>
|
||||
800001ec: 00000417 auipc s0,0x0
|
||||
800001f0: 16040413 add s0,s0,352 # 8000034c <_etext+0x13c>
|
||||
800001f4: 02000513 li a0,32
|
||||
800001f8: ef9ff0ef jal 800000f0 <putch>
|
||||
800001fc: 00144503 lbu a0,1(s0)
|
||||
80000200: 00140413 add s0,s0,1
|
||||
80000204: fe051ae3 bnez a0,800001f8 <strcmp+0x50>
|
||||
80000208: 00100513 li a0,1
|
||||
8000020c: ef1ff0ef jal 800000fc <halt>
|
BIN
am-kernels/tests/cpu-tests/build/if-else-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/if-else-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/if-else-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/if-else-riscv32-nemu.elf
Executable file
Binary file not shown.
85
am-kernels/tests/cpu-tests/build/if-else-riscv32-nemu.txt
Normal file
85
am-kernels/tests/cpu-tests/build/if-else-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,85 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/if-else-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 0ec000ef jal 800000f8 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 0c8000ef jal 800000ec <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: fe010113 add sp,sp,-32
|
||||
8000002c: 00812c23 sw s0,24(sp)
|
||||
80000030: 00912a23 sw s1,20(sp)
|
||||
80000034: 01212823 sw s2,16(sp)
|
||||
80000038: 01312623 sw s3,12(sp)
|
||||
8000003c: 01412423 sw s4,8(sp)
|
||||
80000040: 01512223 sw s5,4(sp)
|
||||
80000044: 01612023 sw s6,0(sp)
|
||||
80000048: 00112e23 sw ra,28(sp)
|
||||
8000004c: 00000417 auipc s0,0x0
|
||||
80000050: 10840413 add s0,s0,264 # 80000154 <test_data>
|
||||
80000054: 00000497 auipc s1,0x0
|
||||
80000058: 0c848493 add s1,s1,200 # 8000011c <ans>
|
||||
8000005c: 00000997 auipc s3,0x0
|
||||
80000060: 13098993 add s3,s3,304 # 8000018c <_bss_start>
|
||||
80000064: 1f400913 li s2,500
|
||||
80000068: 12c00a13 li s4,300
|
||||
8000006c: 06400a93 li s5,100
|
||||
80000070: 03200b13 li s6,50
|
||||
80000074: 00042703 lw a4,0(s0)
|
||||
80000078: 09600793 li a5,150
|
||||
8000007c: 02e94063 blt s2,a4,8000009c <main+0x74>
|
||||
80000080: 06400793 li a5,100
|
||||
80000084: 00ea4c63 blt s4,a4,8000009c <main+0x74>
|
||||
80000088: 04b00793 li a5,75
|
||||
8000008c: 00eac863 blt s5,a4,8000009c <main+0x74>
|
||||
80000090: 00000793 li a5,0
|
||||
80000094: 00eb5463 bge s6,a4,8000009c <main+0x74>
|
||||
80000098: 03200793 li a5,50
|
||||
8000009c: 0004a503 lw a0,0(s1)
|
||||
800000a0: 00440413 add s0,s0,4
|
||||
800000a4: 00448493 add s1,s1,4
|
||||
800000a8: 40f50533 sub a0,a0,a5
|
||||
800000ac: 00153513 seqz a0,a0
|
||||
800000b0: f61ff0ef jal 80000010 <check>
|
||||
800000b4: fd3410e3 bne s0,s3,80000074 <main+0x4c>
|
||||
800000b8: 00100513 li a0,1
|
||||
800000bc: f55ff0ef jal 80000010 <check>
|
||||
800000c0: 01c12083 lw ra,28(sp)
|
||||
800000c4: 01812403 lw s0,24(sp)
|
||||
800000c8: 01412483 lw s1,20(sp)
|
||||
800000cc: 01012903 lw s2,16(sp)
|
||||
800000d0: 00c12983 lw s3,12(sp)
|
||||
800000d4: 00812a03 lw s4,8(sp)
|
||||
800000d8: 00412a83 lw s5,4(sp)
|
||||
800000dc: 00012b03 lw s6,0(sp)
|
||||
800000e0: 00000513 li a0,0
|
||||
800000e4: 02010113 add sp,sp,32
|
||||
800000e8: 00008067 ret
|
||||
|
||||
800000ec <halt>:
|
||||
800000ec: 00050513 mv a0,a0
|
||||
800000f0: 00100073 ebreak
|
||||
800000f4: 0000006f j 800000f4 <halt+0x8>
|
||||
|
||||
800000f8 <_trm_init>:
|
||||
800000f8: ff010113 add sp,sp,-16
|
||||
800000fc: 00000517 auipc a0,0x0
|
||||
80000100: 01c50513 add a0,a0,28 # 80000118 <_etext>
|
||||
80000104: 00112623 sw ra,12(sp)
|
||||
80000108: f21ff0ef jal 80000028 <main>
|
||||
8000010c: 00050513 mv a0,a0
|
||||
80000110: 00100073 ebreak
|
||||
80000114: 0000006f j 80000114 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/leap-year-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/leap-year-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/leap-year-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/leap-year-riscv32-nemu.elf
Executable file
Binary file not shown.
72
am-kernels/tests/cpu-tests/build/leap-year-riscv32-nemu.txt
Normal file
72
am-kernels/tests/cpu-tests/build/leap-year-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,72 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/leap-year-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 0b8000ef jal 800000c4 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 094000ef jal 800000b8 <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: fe010113 add sp,sp,-32
|
||||
8000002c: 00812c23 sw s0,24(sp)
|
||||
80000030: 00912a23 sw s1,20(sp)
|
||||
80000034: 01212823 sw s2,16(sp)
|
||||
80000038: 01312623 sw s3,12(sp)
|
||||
8000003c: 01412423 sw s4,8(sp)
|
||||
80000040: 00112e23 sw ra,28(sp)
|
||||
80000044: 00000497 auipc s1,0x0
|
||||
80000048: 0a448493 add s1,s1,164 # 800000e8 <ans>
|
||||
8000004c: 76200413 li s0,1890
|
||||
80000050: 19000993 li s3,400
|
||||
80000054: 06400a13 li s4,100
|
||||
80000058: 7df00913 li s2,2015
|
||||
8000005c: 00347793 and a5,s0,3
|
||||
80000060: 00079863 bnez a5,80000070 <main+0x48>
|
||||
80000064: 03446733 rem a4,s0,s4
|
||||
80000068: 00100793 li a5,1
|
||||
8000006c: 00071663 bnez a4,80000078 <main+0x50>
|
||||
80000070: 033467b3 rem a5,s0,s3
|
||||
80000074: 0017b793 seqz a5,a5
|
||||
80000078: 0004a503 lw a0,0(s1)
|
||||
8000007c: 00140413 add s0,s0,1
|
||||
80000080: 00448493 add s1,s1,4
|
||||
80000084: 40f50533 sub a0,a0,a5
|
||||
80000088: 00153513 seqz a0,a0
|
||||
8000008c: f85ff0ef jal 80000010 <check>
|
||||
80000090: fd2416e3 bne s0,s2,8000005c <main+0x34>
|
||||
80000094: 01c12083 lw ra,28(sp)
|
||||
80000098: 01812403 lw s0,24(sp)
|
||||
8000009c: 01412483 lw s1,20(sp)
|
||||
800000a0: 01012903 lw s2,16(sp)
|
||||
800000a4: 00c12983 lw s3,12(sp)
|
||||
800000a8: 00812a03 lw s4,8(sp)
|
||||
800000ac: 00000513 li a0,0
|
||||
800000b0: 02010113 add sp,sp,32
|
||||
800000b4: 00008067 ret
|
||||
|
||||
800000b8 <halt>:
|
||||
800000b8: 00050513 mv a0,a0
|
||||
800000bc: 00100073 ebreak
|
||||
800000c0: 0000006f j 800000c0 <halt+0x8>
|
||||
|
||||
800000c4 <_trm_init>:
|
||||
800000c4: ff010113 add sp,sp,-16
|
||||
800000c8: 00000517 auipc a0,0x0
|
||||
800000cc: 01c50513 add a0,a0,28 # 800000e4 <_etext>
|
||||
800000d0: 00112623 sw ra,12(sp)
|
||||
800000d4: f55ff0ef jal 80000028 <main>
|
||||
800000d8: 00050513 mv a0,a0
|
||||
800000dc: 00100073 ebreak
|
||||
800000e0: 0000006f j 800000e0 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/load-store-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/load-store-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/load-store-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/load-store-riscv32-nemu.elf
Executable file
Binary file not shown.
140
am-kernels/tests/cpu-tests/build/load-store-riscv32-nemu.txt
Normal file
140
am-kernels/tests/cpu-tests/build/load-store-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,140 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/load-store-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 1c8000ef jal 800001d4 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 1a4000ef jal 800001c8 <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: fe010113 add sp,sp,-32
|
||||
8000002c: 00812c23 sw s0,24(sp)
|
||||
80000030: 00000417 auipc s0,0x0
|
||||
80000034: 23840413 add s0,s0,568 # 80000268 <mem>
|
||||
80000038: 00912a23 sw s1,20(sp)
|
||||
8000003c: 01212823 sw s2,16(sp)
|
||||
80000040: 01312623 sw s3,12(sp)
|
||||
80000044: 01412423 sw s4,8(sp)
|
||||
80000048: 00112e23 sw ra,28(sp)
|
||||
8000004c: 00000997 auipc s3,0x0
|
||||
80000050: 1fc98993 add s3,s3,508 # 80000248 <lh_ans>
|
||||
80000054: 00000a17 auipc s4,0x0
|
||||
80000058: 224a0a13 add s4,s4,548 # 80000278 <_bss_start>
|
||||
8000005c: 00040913 mv s2,s0
|
||||
80000060: 00040493 mv s1,s0
|
||||
80000064: 0009a783 lw a5,0(s3)
|
||||
80000068: 00049503 lh a0,0(s1)
|
||||
8000006c: 00248493 add s1,s1,2
|
||||
80000070: 00498993 add s3,s3,4
|
||||
80000074: 40f50533 sub a0,a0,a5
|
||||
80000078: 00153513 seqz a0,a0
|
||||
8000007c: f95ff0ef jal 80000010 <check>
|
||||
80000080: ff4492e3 bne s1,s4,80000064 <main+0x3c>
|
||||
80000084: 00000497 auipc s1,0x0
|
||||
80000088: 1a448493 add s1,s1,420 # 80000228 <lhu_ans>
|
||||
8000008c: 0004a783 lw a5,0(s1)
|
||||
80000090: 00045503 lhu a0,0(s0)
|
||||
80000094: 00240413 add s0,s0,2
|
||||
80000098: 00448493 add s1,s1,4
|
||||
8000009c: 40f50533 sub a0,a0,a5
|
||||
800000a0: 00153513 seqz a0,a0
|
||||
800000a4: f6dff0ef jal 80000010 <check>
|
||||
800000a8: ff4412e3 bne s0,s4,8000008c <main+0x64>
|
||||
800000ac: 00294683 lbu a3,2(s2)
|
||||
800000b0: 00194603 lbu a2,1(s2)
|
||||
800000b4: 00394703 lbu a4,3(s2)
|
||||
800000b8: 00494783 lbu a5,4(s2)
|
||||
800000bc: 00000417 auipc s0,0x0
|
||||
800000c0: 13c40413 add s0,s0,316 # 800001f8 <lwlr_ans>
|
||||
800000c4: 00869693 sll a3,a3,0x8
|
||||
800000c8: 00c6e6b3 or a3,a3,a2
|
||||
800000cc: 00042503 lw a0,0(s0)
|
||||
800000d0: 01071713 sll a4,a4,0x10
|
||||
800000d4: 00d76733 or a4,a4,a3
|
||||
800000d8: 01879793 sll a5,a5,0x18
|
||||
800000dc: 00e7e7b3 or a5,a5,a4
|
||||
800000e0: 40f50533 sub a0,a0,a5
|
||||
800000e4: 00153513 seqz a0,a0
|
||||
800000e8: f29ff0ef jal 80000010 <check>
|
||||
800000ec: 00694683 lbu a3,6(s2)
|
||||
800000f0: 00594603 lbu a2,5(s2)
|
||||
800000f4: 00794703 lbu a4,7(s2)
|
||||
800000f8: 00894783 lbu a5,8(s2)
|
||||
800000fc: 00869693 sll a3,a3,0x8
|
||||
80000100: 00c6e6b3 or a3,a3,a2
|
||||
80000104: 00442503 lw a0,4(s0)
|
||||
80000108: 01071713 sll a4,a4,0x10
|
||||
8000010c: 00d76733 or a4,a4,a3
|
||||
80000110: 01879793 sll a5,a5,0x18
|
||||
80000114: 00e7e7b3 or a5,a5,a4
|
||||
80000118: 40f50533 sub a0,a0,a5
|
||||
8000011c: 00153513 seqz a0,a0
|
||||
80000120: ef1ff0ef jal 80000010 <check>
|
||||
80000124: 00a94683 lbu a3,10(s2)
|
||||
80000128: 00994603 lbu a2,9(s2)
|
||||
8000012c: 00b94703 lbu a4,11(s2)
|
||||
80000130: 00c94783 lbu a5,12(s2)
|
||||
80000134: 00869693 sll a3,a3,0x8
|
||||
80000138: 00842503 lw a0,8(s0)
|
||||
8000013c: 00c6e6b3 or a3,a3,a2
|
||||
80000140: 01071713 sll a4,a4,0x10
|
||||
80000144: 00d76733 or a4,a4,a3
|
||||
80000148: 01879793 sll a5,a5,0x18
|
||||
8000014c: 00e7e7b3 or a5,a5,a4
|
||||
80000150: 40f50533 sub a0,a0,a5
|
||||
80000154: 00153513 seqz a0,a0
|
||||
80000158: eb9ff0ef jal 80000010 <check>
|
||||
8000015c: 00000497 auipc s1,0x0
|
||||
80000160: 0ac48493 add s1,s1,172 # 80000208 <sh_ans>
|
||||
80000164: 00100413 li s0,1
|
||||
80000168: 00100a13 li s4,1
|
||||
8000016c: 01100993 li s3,17
|
||||
80000170: 008a17b3 sll a5,s4,s0
|
||||
80000174: 0004a503 lw a0,0(s1)
|
||||
80000178: fff7c793 not a5,a5
|
||||
8000017c: 01079793 sll a5,a5,0x10
|
||||
80000180: 0107d793 srl a5,a5,0x10
|
||||
80000184: 00890733 add a4,s2,s0
|
||||
80000188: 40f50533 sub a0,a0,a5
|
||||
8000018c: 00153513 seqz a0,a0
|
||||
80000190: fef71fa3 sh a5,-1(a4)
|
||||
80000194: 00240413 add s0,s0,2
|
||||
80000198: e79ff0ef jal 80000010 <check>
|
||||
8000019c: 00448493 add s1,s1,4
|
||||
800001a0: fd3418e3 bne s0,s3,80000170 <main+0x148>
|
||||
800001a4: 01c12083 lw ra,28(sp)
|
||||
800001a8: 01812403 lw s0,24(sp)
|
||||
800001ac: 01412483 lw s1,20(sp)
|
||||
800001b0: 01012903 lw s2,16(sp)
|
||||
800001b4: 00c12983 lw s3,12(sp)
|
||||
800001b8: 00812a03 lw s4,8(sp)
|
||||
800001bc: 00000513 li a0,0
|
||||
800001c0: 02010113 add sp,sp,32
|
||||
800001c4: 00008067 ret
|
||||
|
||||
800001c8 <halt>:
|
||||
800001c8: 00050513 mv a0,a0
|
||||
800001cc: 00100073 ebreak
|
||||
800001d0: 0000006f j 800001d0 <halt+0x8>
|
||||
|
||||
800001d4 <_trm_init>:
|
||||
800001d4: ff010113 add sp,sp,-16
|
||||
800001d8: 00000517 auipc a0,0x0
|
||||
800001dc: 01c50513 add a0,a0,28 # 800001f4 <_etext>
|
||||
800001e0: 00112623 sw ra,12(sp)
|
||||
800001e4: e45ff0ef jal 80000028 <main>
|
||||
800001e8: 00050513 mv a0,a0
|
||||
800001ec: 00100073 ebreak
|
||||
800001f0: 0000006f j 800001f0 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/matrix-mul-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/matrix-mul-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/matrix-mul-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/matrix-mul-riscv32-nemu.elf
Executable file
Binary file not shown.
104
am-kernels/tests/cpu-tests/build/matrix-mul-riscv32-nemu.txt
Normal file
104
am-kernels/tests/cpu-tests/build/matrix-mul-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,104 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/matrix-mul-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 138000ef jal 80000144 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 114000ef jal 80000138 <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: fd010113 add sp,sp,-48
|
||||
8000002c: 02912223 sw s1,36(sp)
|
||||
80000030: 03212023 sw s2,32(sp)
|
||||
80000034: 01312e23 sw s3,28(sp)
|
||||
80000038: 01412c23 sw s4,24(sp)
|
||||
8000003c: 01512a23 sw s5,20(sp)
|
||||
80000040: 01612823 sw s6,16(sp)
|
||||
80000044: 02112623 sw ra,44(sp)
|
||||
80000048: 02812423 sw s0,40(sp)
|
||||
8000004c: 01712623 sw s7,12(sp)
|
||||
80000050: 01812423 sw s8,8(sp)
|
||||
80000054: 00000497 auipc s1,0x0
|
||||
80000058: 43448493 add s1,s1,1076 # 80000488 <a>
|
||||
8000005c: 00000a17 auipc s4,0x0
|
||||
80000060: 5bca0a13 add s4,s4,1468 # 80000618 <c>
|
||||
80000064: 00000997 auipc s3,0x0
|
||||
80000068: 10498993 add s3,s3,260 # 80000168 <ans>
|
||||
8000006c: 00000b17 auipc s6,0x0
|
||||
80000070: 5acb0b13 add s6,s6,1452 # 80000618 <c>
|
||||
80000074: 00000917 auipc s2,0x0
|
||||
80000078: 43c90913 add s2,s2,1084 # 800004b0 <a+0x28>
|
||||
8000007c: 00000a97 auipc s5,0x0
|
||||
80000080: 40ca8a93 add s5,s5,1036 # 80000488 <a>
|
||||
80000084: 000a8593 mv a1,s5
|
||||
80000088: 00098c13 mv s8,s3
|
||||
8000008c: 000a0b93 mv s7,s4
|
||||
80000090: e7058413 add s0,a1,-400
|
||||
80000094: 00048713 mv a4,s1
|
||||
80000098: 00000693 li a3,0
|
||||
8000009c: 00072783 lw a5,0(a4)
|
||||
800000a0: 00042603 lw a2,0(s0)
|
||||
800000a4: 02840413 add s0,s0,40
|
||||
800000a8: 00470713 add a4,a4,4
|
||||
800000ac: 02c787b3 mul a5,a5,a2
|
||||
800000b0: 00f686b3 add a3,a3,a5
|
||||
800000b4: feb414e3 bne s0,a1,8000009c <main+0x74>
|
||||
800000b8: 000c2503 lw a0,0(s8)
|
||||
800000bc: 00dba023 sw a3,0(s7)
|
||||
800000c0: 004c0c13 add s8,s8,4
|
||||
800000c4: 40d50533 sub a0,a0,a3
|
||||
800000c8: 00153513 seqz a0,a0
|
||||
800000cc: f45ff0ef jal 80000010 <check>
|
||||
800000d0: 00100513 li a0,1
|
||||
800000d4: f3dff0ef jal 80000010 <check>
|
||||
800000d8: 00440593 add a1,s0,4
|
||||
800000dc: 004b8b93 add s7,s7,4
|
||||
800000e0: fab918e3 bne s2,a1,80000090 <main+0x68>
|
||||
800000e4: 00100513 li a0,1
|
||||
800000e8: 02848493 add s1,s1,40
|
||||
800000ec: f25ff0ef jal 80000010 <check>
|
||||
800000f0: 028a0a13 add s4,s4,40
|
||||
800000f4: 02898993 add s3,s3,40
|
||||
800000f8: f96496e3 bne s1,s6,80000084 <main+0x5c>
|
||||
800000fc: 00100513 li a0,1
|
||||
80000100: f11ff0ef jal 80000010 <check>
|
||||
80000104: 02c12083 lw ra,44(sp)
|
||||
80000108: 02812403 lw s0,40(sp)
|
||||
8000010c: 02412483 lw s1,36(sp)
|
||||
80000110: 02012903 lw s2,32(sp)
|
||||
80000114: 01c12983 lw s3,28(sp)
|
||||
80000118: 01812a03 lw s4,24(sp)
|
||||
8000011c: 01412a83 lw s5,20(sp)
|
||||
80000120: 01012b03 lw s6,16(sp)
|
||||
80000124: 00c12b83 lw s7,12(sp)
|
||||
80000128: 00812c03 lw s8,8(sp)
|
||||
8000012c: 00000513 li a0,0
|
||||
80000130: 03010113 add sp,sp,48
|
||||
80000134: 00008067 ret
|
||||
|
||||
80000138 <halt>:
|
||||
80000138: 00050513 mv a0,a0
|
||||
8000013c: 00100073 ebreak
|
||||
80000140: 0000006f j 80000140 <halt+0x8>
|
||||
|
||||
80000144 <_trm_init>:
|
||||
80000144: ff010113 add sp,sp,-16
|
||||
80000148: 00000517 auipc a0,0x0
|
||||
8000014c: 01c50513 add a0,a0,28 # 80000164 <_etext>
|
||||
80000150: 00112623 sw ra,12(sp)
|
||||
80000154: ed5ff0ef jal 80000028 <main>
|
||||
80000158: 00050513 mv a0,a0
|
||||
8000015c: 00100073 ebreak
|
||||
80000160: 0000006f j 80000160 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/max-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/max-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/max-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/max-riscv32-nemu.elf
Executable file
Binary file not shown.
90
am-kernels/tests/cpu-tests/build/max-riscv32-nemu.txt
Normal file
90
am-kernels/tests/cpu-tests/build/max-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,90 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/max-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 100000ef jal 8000010c <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 0dc000ef jal 80000100 <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: fd010113 add sp,sp,-48
|
||||
8000002c: 01712623 sw s7,12(sp)
|
||||
80000030: 00000b97 auipc s7,0x0
|
||||
80000034: 200b8b93 add s7,s7,512 # 80000230 <test_data>
|
||||
80000038: 01312e23 sw s3,28(sp)
|
||||
8000003c: 01412c23 sw s4,24(sp)
|
||||
80000040: 01512a23 sw s5,20(sp)
|
||||
80000044: 01612823 sw s6,16(sp)
|
||||
80000048: 01812423 sw s8,8(sp)
|
||||
8000004c: 02112623 sw ra,44(sp)
|
||||
80000050: 02812423 sw s0,40(sp)
|
||||
80000054: 02912223 sw s1,36(sp)
|
||||
80000058: 03212023 sw s2,32(sp)
|
||||
8000005c: 00000b17 auipc s6,0x0
|
||||
80000060: 0d4b0b13 add s6,s6,212 # 80000130 <ans>
|
||||
80000064: 000b8a93 mv s5,s7
|
||||
80000068: 00000a13 li s4,0
|
||||
8000006c: 00000997 auipc s3,0x0
|
||||
80000070: 1e498993 add s3,s3,484 # 80000250 <_bss_start>
|
||||
80000074: 04000c13 li s8,64
|
||||
80000078: 000aa903 lw s2,0(s5)
|
||||
8000007c: 000b0493 mv s1,s6
|
||||
80000080: 000b8413 mv s0,s7
|
||||
80000084: 00042503 lw a0,0(s0)
|
||||
80000088: 01255463 bge a0,s2,80000090 <main+0x68>
|
||||
8000008c: 00090513 mv a0,s2
|
||||
80000090: 0004a783 lw a5,0(s1)
|
||||
80000094: 00440413 add s0,s0,4
|
||||
80000098: 00448493 add s1,s1,4
|
||||
8000009c: 40f50533 sub a0,a0,a5
|
||||
800000a0: 00153513 seqz a0,a0
|
||||
800000a4: f6dff0ef jal 80000010 <check>
|
||||
800000a8: fc899ee3 bne s3,s0,80000084 <main+0x5c>
|
||||
800000ac: 00100513 li a0,1
|
||||
800000b0: 008a0a13 add s4,s4,8
|
||||
800000b4: f5dff0ef jal 80000010 <check>
|
||||
800000b8: 004a8a93 add s5,s5,4
|
||||
800000bc: 020b0b13 add s6,s6,32
|
||||
800000c0: fb8a1ce3 bne s4,s8,80000078 <main+0x50>
|
||||
800000c4: 00100513 li a0,1
|
||||
800000c8: f49ff0ef jal 80000010 <check>
|
||||
800000cc: 02c12083 lw ra,44(sp)
|
||||
800000d0: 02812403 lw s0,40(sp)
|
||||
800000d4: 02412483 lw s1,36(sp)
|
||||
800000d8: 02012903 lw s2,32(sp)
|
||||
800000dc: 01c12983 lw s3,28(sp)
|
||||
800000e0: 01812a03 lw s4,24(sp)
|
||||
800000e4: 01412a83 lw s5,20(sp)
|
||||
800000e8: 01012b03 lw s6,16(sp)
|
||||
800000ec: 00c12b83 lw s7,12(sp)
|
||||
800000f0: 00812c03 lw s8,8(sp)
|
||||
800000f4: 00000513 li a0,0
|
||||
800000f8: 03010113 add sp,sp,48
|
||||
800000fc: 00008067 ret
|
||||
|
||||
80000100 <halt>:
|
||||
80000100: 00050513 mv a0,a0
|
||||
80000104: 00100073 ebreak
|
||||
80000108: 0000006f j 80000108 <halt+0x8>
|
||||
|
||||
8000010c <_trm_init>:
|
||||
8000010c: ff010113 add sp,sp,-16
|
||||
80000110: 00000517 auipc a0,0x0
|
||||
80000114: 01c50513 add a0,a0,28 # 8000012c <_etext>
|
||||
80000118: 00112623 sw ra,12(sp)
|
||||
8000011c: f0dff0ef jal 80000028 <main>
|
||||
80000120: 00050513 mv a0,a0
|
||||
80000124: 00100073 ebreak
|
||||
80000128: 0000006f j 80000128 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/mersenne-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/mersenne-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/mersenne-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/mersenne-riscv32-nemu.elf
Executable file
Binary file not shown.
426
am-kernels/tests/cpu-tests/build/mersenne-riscv32-nemu.txt
Normal file
426
am-kernels/tests/cpu-tests/build/mersenne-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,426 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/mersenne-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 134000ef jal 80000140 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 110000ef jal 80000134 <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: fe010113 add sp,sp,-32
|
||||
8000002c: 00112e23 sw ra,28(sp)
|
||||
80000030: 00812c23 sw s0,24(sp)
|
||||
80000034: 00500793 li a5,5
|
||||
80000038: 3a100693 li a3,929
|
||||
8000003c: 00878713 add a4,a5,8
|
||||
80000040: 00678793 add a5,a5,6
|
||||
80000044: 02f78633 mul a2,a5,a5
|
||||
80000048: 02c6c463 blt a3,a2,80000070 <main+0x48>
|
||||
8000004c: 00d78663 beq a5,a3,80000058 <main+0x30>
|
||||
80000050: 02e6e733 rem a4,a3,a4
|
||||
80000054: fe0714e3 bnez a4,8000003c <main+0x14>
|
||||
80000058: 00100413 li s0,1
|
||||
8000005c: 01c12083 lw ra,28(sp)
|
||||
80000060: 00040513 mv a0,s0
|
||||
80000064: 01812403 lw s0,24(sp)
|
||||
80000068: 02010113 add sp,sp,32
|
||||
8000006c: 00008067 ret
|
||||
80000070: 01312623 sw s3,12(sp)
|
||||
80000074: 00912a23 sw s1,20(sp)
|
||||
80000078: 01212823 sw s2,16(sp)
|
||||
8000007c: 01412423 sw s4,8(sp)
|
||||
80000080: 01600793 li a5,22
|
||||
80000084: 3a100993 li s3,929
|
||||
80000088: fff78793 add a5,a5,-1
|
||||
8000008c: 00199993 sll s3,s3,0x1
|
||||
80000090: fe079ce3 bnez a5,80000088 <main+0x60>
|
||||
80000094: 74300493 li s1,1859
|
||||
80000098: 00100a13 li s4,1
|
||||
8000009c: 41f4d913 sra s2,s1,0x1f
|
||||
800000a0: 00098413 mv s0,s3
|
||||
800000a4: 00100793 li a5,1
|
||||
800000a8: 02f795b3 mulh a1,a5,a5
|
||||
800000ac: 00048613 mv a2,s1
|
||||
800000b0: 00090693 mv a3,s2
|
||||
800000b4: 02f78533 mul a0,a5,a5
|
||||
800000b8: 410000ef jal 800004c8 <__moddi3>
|
||||
800000bc: 00050793 mv a5,a0
|
||||
800000c0: 02044663 bltz s0,800000ec <main+0xc4>
|
||||
800000c4: 00a4d463 bge s1,a0,800000cc <main+0xa4>
|
||||
800000c8: 409507b3 sub a5,a0,s1
|
||||
800000cc: 02f795b3 mulh a1,a5,a5
|
||||
800000d0: 00048613 mv a2,s1
|
||||
800000d4: 00090693 mv a3,s2
|
||||
800000d8: 00141413 sll s0,s0,0x1
|
||||
800000dc: 02f78533 mul a0,a5,a5
|
||||
800000e0: 3e8000ef jal 800004c8 <__moddi3>
|
||||
800000e4: 00050793 mv a5,a0
|
||||
800000e8: fc045ee3 bgez s0,800000c4 <main+0x9c>
|
||||
800000ec: 00151793 sll a5,a0,0x1
|
||||
800000f0: 00141413 sll s0,s0,0x1
|
||||
800000f4: 00f4d463 bge s1,a5,800000fc <main+0xd4>
|
||||
800000f8: 409787b3 sub a5,a5,s1
|
||||
800000fc: fa0416e3 bnez s0,800000a8 <main+0x80>
|
||||
80000100: 01478663 beq a5,s4,8000010c <main+0xe4>
|
||||
80000104: 74248493 add s1,s1,1858
|
||||
80000108: f95ff06f j 8000009c <main+0x74>
|
||||
8000010c: ffffd7b7 lui a5,0xffffd
|
||||
80000110: d3178793 add a5,a5,-719 # ffffcd31 <_end+0x7fff3d31>
|
||||
80000114: 00f48533 add a0,s1,a5
|
||||
80000118: 00153513 seqz a0,a0
|
||||
8000011c: ef5ff0ef jal 80000010 <check>
|
||||
80000120: 01412483 lw s1,20(sp)
|
||||
80000124: 01012903 lw s2,16(sp)
|
||||
80000128: 00c12983 lw s3,12(sp)
|
||||
8000012c: 00812a03 lw s4,8(sp)
|
||||
80000130: f2dff06f j 8000005c <main+0x34>
|
||||
|
||||
80000134 <halt>:
|
||||
80000134: 00050513 mv a0,a0
|
||||
80000138: 00100073 ebreak
|
||||
8000013c: 0000006f j 8000013c <halt+0x8>
|
||||
|
||||
80000140 <_trm_init>:
|
||||
80000140: ff010113 add sp,sp,-16
|
||||
80000144: 00000517 auipc a0,0x0
|
||||
80000148: 50850513 add a0,a0,1288 # 8000064c <_etext>
|
||||
8000014c: 00112623 sw ra,12(sp)
|
||||
80000150: ed9ff0ef jal 80000028 <main>
|
||||
80000154: 00050513 mv a0,a0
|
||||
80000158: 00100073 ebreak
|
||||
8000015c: 0000006f j 8000015c <_trm_init+0x1c>
|
||||
|
||||
80000160 <__udivmoddi4>:
|
||||
80000160: fd010113 add sp,sp,-48
|
||||
80000164: 01312e23 sw s3,28(sp)
|
||||
80000168: 01412c23 sw s4,24(sp)
|
||||
8000016c: 01612823 sw s6,16(sp)
|
||||
80000170: 01712623 sw s7,12(sp)
|
||||
80000174: 02112623 sw ra,44(sp)
|
||||
80000178: 00068b13 mv s6,a3
|
||||
8000017c: 00050993 mv s3,a0
|
||||
80000180: 00060a13 mv s4,a2
|
||||
80000184: 00070b93 mv s7,a4
|
||||
80000188: 02059e63 bnez a1,800001c4 <__udivmoddi4+0x64>
|
||||
8000018c: 1a069263 bnez a3,80000330 <__udivmoddi4+0x1d0>
|
||||
80000190: 00070863 beqz a4,800001a0 <__udivmoddi4+0x40>
|
||||
80000194: 02c577b3 remu a5,a0,a2
|
||||
80000198: 00072223 sw zero,4(a4)
|
||||
8000019c: 00f72023 sw a5,0(a4)
|
||||
800001a0: 0349d533 divu a0,s3,s4
|
||||
800001a4: 00000593 li a1,0
|
||||
800001a8: 02c12083 lw ra,44(sp)
|
||||
800001ac: 01c12983 lw s3,28(sp)
|
||||
800001b0: 01812a03 lw s4,24(sp)
|
||||
800001b4: 01012b03 lw s6,16(sp)
|
||||
800001b8: 00c12b83 lw s7,12(sp)
|
||||
800001bc: 03010113 add sp,sp,48
|
||||
800001c0: 00008067 ret
|
||||
800001c4: 02912223 sw s1,36(sp)
|
||||
800001c8: 03212023 sw s2,32(sp)
|
||||
800001cc: 01512a23 sw s5,20(sp)
|
||||
800001d0: 02812423 sw s0,40(sp)
|
||||
800001d4: 00058913 mv s2,a1
|
||||
800001d8: 00058493 mv s1,a1
|
||||
800001dc: 00060a93 mv s5,a2
|
||||
800001e0: 0e061e63 bnez a2,800002dc <__udivmoddi4+0x17c>
|
||||
800001e4: 1c068063 beqz a3,800003a4 <__udivmoddi4+0x244>
|
||||
800001e8: 22050a63 beqz a0,8000041c <__udivmoddi4+0x2bc>
|
||||
800001ec: fff68793 add a5,a3,-1
|
||||
800001f0: 00d7f733 and a4,a5,a3
|
||||
800001f4: 28070263 beqz a4,80000478 <__udivmoddi4+0x318>
|
||||
800001f8: 00068513 mv a0,a3
|
||||
800001fc: 348000ef jal 80000544 <__clzsi2>
|
||||
80000200: 00050413 mv s0,a0
|
||||
80000204: 00090513 mv a0,s2
|
||||
80000208: 33c000ef jal 80000544 <__clzsi2>
|
||||
8000020c: 40a406b3 sub a3,s0,a0
|
||||
80000210: 01e00793 li a5,30
|
||||
80000214: 18d7ea63 bltu a5,a3,800003a8 <__udivmoddi4+0x248>
|
||||
80000218: 00168693 add a3,a3,1
|
||||
8000021c: 02000793 li a5,32
|
||||
80000220: 40d787b3 sub a5,a5,a3
|
||||
80000224: 00f91633 sll a2,s2,a5
|
||||
80000228: 00d9d733 srl a4,s3,a3
|
||||
8000022c: 00d95433 srl s0,s2,a3
|
||||
80000230: 00f99833 sll a6,s3,a5
|
||||
80000234: 00e664b3 or s1,a2,a4
|
||||
80000238: 00000713 li a4,0
|
||||
8000023c: 01f85793 srl a5,a6,0x1f
|
||||
80000240: 00149593 sll a1,s1,0x1
|
||||
80000244: 00f5e5b3 or a1,a1,a5
|
||||
80000248: 01f4d493 srl s1,s1,0x1f
|
||||
8000024c: 00141793 sll a5,s0,0x1
|
||||
80000250: 0097e7b3 or a5,a5,s1
|
||||
80000254: 40ba0333 sub t1,s4,a1
|
||||
80000258: 006a3633 sltu a2,s4,t1
|
||||
8000025c: 40fb08b3 sub a7,s6,a5
|
||||
80000260: 40c888b3 sub a7,a7,a2
|
||||
80000264: 00133313 seqz t1,t1
|
||||
80000268: 406888b3 sub a7,a7,t1
|
||||
8000026c: 41f8d313 sra t1,a7,0x1f
|
||||
80000270: 014374b3 and s1,t1,s4
|
||||
80000274: 409584b3 sub s1,a1,s1
|
||||
80000278: 01637333 and t1,t1,s6
|
||||
8000027c: 01fad613 srl a2,s5,0x1f
|
||||
80000280: 00181813 sll a6,a6,0x1
|
||||
80000284: 001a9a93 sll s5,s5,0x1
|
||||
80000288: 0095b5b3 sltu a1,a1,s1
|
||||
8000028c: 406787b3 sub a5,a5,t1
|
||||
80000290: fff68693 add a3,a3,-1
|
||||
80000294: 00eaeab3 or s5,s5,a4
|
||||
80000298: 00c86833 or a6,a6,a2
|
||||
8000029c: 01f8d713 srl a4,a7,0x1f
|
||||
800002a0: 40b78433 sub s0,a5,a1
|
||||
800002a4: f8069ce3 bnez a3,8000023c <__udivmoddi4+0xdc>
|
||||
800002a8: 000b8663 beqz s7,800002b4 <__udivmoddi4+0x154>
|
||||
800002ac: 009ba023 sw s1,0(s7)
|
||||
800002b0: 008ba223 sw s0,4(s7)
|
||||
800002b4: 01fad913 srl s2,s5,0x1f
|
||||
800002b8: 001a9993 sll s3,s5,0x1
|
||||
800002bc: 00181793 sll a5,a6,0x1
|
||||
800002c0: 00f965b3 or a1,s2,a5
|
||||
800002c4: 02812403 lw s0,40(sp)
|
||||
800002c8: 02412483 lw s1,36(sp)
|
||||
800002cc: 02012903 lw s2,32(sp)
|
||||
800002d0: 01412a83 lw s5,20(sp)
|
||||
800002d4: 00e9e533 or a0,s3,a4
|
||||
800002d8: ed1ff06f j 800001a8 <__udivmoddi4+0x48>
|
||||
800002dc: 06068663 beqz a3,80000348 <__udivmoddi4+0x1e8>
|
||||
800002e0: 00068513 mv a0,a3
|
||||
800002e4: 260000ef jal 80000544 <__clzsi2>
|
||||
800002e8: 00050413 mv s0,a0
|
||||
800002ec: 00090513 mv a0,s2
|
||||
800002f0: 254000ef jal 80000544 <__clzsi2>
|
||||
800002f4: 40a406b3 sub a3,s0,a0
|
||||
800002f8: 01f00793 li a5,31
|
||||
800002fc: 0ad7e663 bltu a5,a3,800003a8 <__udivmoddi4+0x248>
|
||||
80000300: 00168693 add a3,a3,1
|
||||
80000304: 02000793 li a5,32
|
||||
80000308: 00098813 mv a6,s3
|
||||
8000030c: 18f68663 beq a3,a5,80000498 <__udivmoddi4+0x338>
|
||||
80000310: 40d787b3 sub a5,a5,a3
|
||||
80000314: 00d9d733 srl a4,s3,a3
|
||||
80000318: 00f91633 sll a2,s2,a5
|
||||
8000031c: 00d95433 srl s0,s2,a3
|
||||
80000320: 00f99833 sll a6,s3,a5
|
||||
80000324: 00e664b3 or s1,a2,a4
|
||||
80000328: 00000a93 li s5,0
|
||||
8000032c: f0dff06f j 80000238 <__udivmoddi4+0xd8>
|
||||
80000330: 00070663 beqz a4,8000033c <__udivmoddi4+0x1dc>
|
||||
80000334: 00aba023 sw a0,0(s7)
|
||||
80000338: 00072223 sw zero,4(a4)
|
||||
8000033c: 00000513 li a0,0
|
||||
80000340: 00000593 li a1,0
|
||||
80000344: e65ff06f j 800001a8 <__udivmoddi4+0x48>
|
||||
80000348: fff60793 add a5,a2,-1
|
||||
8000034c: 00c7f733 and a4,a5,a2
|
||||
80000350: 06071c63 bnez a4,800003c8 <__udivmoddi4+0x268>
|
||||
80000354: 000b8863 beqz s7,80000364 <__udivmoddi4+0x204>
|
||||
80000358: 00a7f7b3 and a5,a5,a0
|
||||
8000035c: 00fba023 sw a5,0(s7)
|
||||
80000360: 000ba223 sw zero,4(s7)
|
||||
80000364: 00100793 li a5,1
|
||||
80000368: 0efa0063 beq s4,a5,80000448 <__udivmoddi4+0x2e8>
|
||||
8000036c: 000a0513 mv a0,s4
|
||||
80000370: 264000ef jal 800005d4 <__ctzsi2>
|
||||
80000374: 02000713 li a4,32
|
||||
80000378: 40a70733 sub a4,a4,a0
|
||||
8000037c: 00050793 mv a5,a0
|
||||
80000380: 00e91733 sll a4,s2,a4
|
||||
80000384: 00a9d833 srl a6,s3,a0
|
||||
80000388: 00f955b3 srl a1,s2,a5
|
||||
8000038c: 02812403 lw s0,40(sp)
|
||||
80000390: 02412483 lw s1,36(sp)
|
||||
80000394: 02012903 lw s2,32(sp)
|
||||
80000398: 01412a83 lw s5,20(sp)
|
||||
8000039c: 01076533 or a0,a4,a6
|
||||
800003a0: e09ff06f j 800001a8 <__udivmoddi4+0x48>
|
||||
800003a4: 00100073 ebreak
|
||||
800003a8: 0a0b8e63 beqz s7,80000464 <__udivmoddi4+0x304>
|
||||
800003ac: 012ba223 sw s2,4(s7)
|
||||
800003b0: 02812403 lw s0,40(sp)
|
||||
800003b4: 02412483 lw s1,36(sp)
|
||||
800003b8: 02012903 lw s2,32(sp)
|
||||
800003bc: 01412a83 lw s5,20(sp)
|
||||
800003c0: 013ba023 sw s3,0(s7)
|
||||
800003c4: f79ff06f j 8000033c <__udivmoddi4+0x1dc>
|
||||
800003c8: 00060513 mv a0,a2
|
||||
800003cc: 00068413 mv s0,a3
|
||||
800003d0: 174000ef jal 80000544 <__clzsi2>
|
||||
800003d4: 00050913 mv s2,a0
|
||||
800003d8: 00048513 mv a0,s1
|
||||
800003dc: 168000ef jal 80000544 <__clzsi2>
|
||||
800003e0: 40a90533 sub a0,s2,a0
|
||||
800003e4: 02150693 add a3,a0,33
|
||||
800003e8: 02000793 li a5,32
|
||||
800003ec: 00098813 mv a6,s3
|
||||
800003f0: 00000a93 li s5,0
|
||||
800003f4: e4f682e3 beq a3,a5,80000238 <__udivmoddi4+0xd8>
|
||||
800003f8: 01f00713 li a4,31
|
||||
800003fc: 0ad76463 bltu a4,a3,800004a4 <__udivmoddi4+0x344>
|
||||
80000400: 40d78733 sub a4,a5,a3
|
||||
80000404: 00d4d433 srl s0,s1,a3
|
||||
80000408: 00d9d7b3 srl a5,s3,a3
|
||||
8000040c: 00e494b3 sll s1,s1,a4
|
||||
80000410: 00f4e4b3 or s1,s1,a5
|
||||
80000414: 00e99833 sll a6,s3,a4
|
||||
80000418: e21ff06f j 80000238 <__udivmoddi4+0xd8>
|
||||
8000041c: 00070863 beqz a4,8000042c <__udivmoddi4+0x2cc>
|
||||
80000420: 02d5f7b3 remu a5,a1,a3
|
||||
80000424: 00072023 sw zero,0(a4)
|
||||
80000428: 00f72223 sw a5,4(a4)
|
||||
8000042c: 03695533 divu a0,s2,s6
|
||||
80000430: 02812403 lw s0,40(sp)
|
||||
80000434: 02412483 lw s1,36(sp)
|
||||
80000438: 02012903 lw s2,32(sp)
|
||||
8000043c: 01412a83 lw s5,20(sp)
|
||||
80000440: 00000593 li a1,0
|
||||
80000444: d65ff06f j 800001a8 <__udivmoddi4+0x48>
|
||||
80000448: 00090593 mv a1,s2
|
||||
8000044c: 02812403 lw s0,40(sp)
|
||||
80000450: 02412483 lw s1,36(sp)
|
||||
80000454: 02012903 lw s2,32(sp)
|
||||
80000458: 01412a83 lw s5,20(sp)
|
||||
8000045c: 00098513 mv a0,s3
|
||||
80000460: d49ff06f j 800001a8 <__udivmoddi4+0x48>
|
||||
80000464: 02812403 lw s0,40(sp)
|
||||
80000468: 02412483 lw s1,36(sp)
|
||||
8000046c: 02012903 lw s2,32(sp)
|
||||
80000470: 01412a83 lw s5,20(sp)
|
||||
80000474: ec9ff06f j 8000033c <__udivmoddi4+0x1dc>
|
||||
80000478: 000b8863 beqz s7,80000488 <__udivmoddi4+0x328>
|
||||
8000047c: 00b7f7b3 and a5,a5,a1
|
||||
80000480: 00aba023 sw a0,0(s7)
|
||||
80000484: 00fba223 sw a5,4(s7)
|
||||
80000488: 000b0513 mv a0,s6
|
||||
8000048c: 148000ef jal 800005d4 <__ctzsi2>
|
||||
80000490: 00a95533 srl a0,s2,a0
|
||||
80000494: f9dff06f j 80000430 <__udivmoddi4+0x2d0>
|
||||
80000498: 00000413 li s0,0
|
||||
8000049c: 00000a93 li s5,0
|
||||
800004a0: d99ff06f j 80000238 <__udivmoddi4+0xd8>
|
||||
800004a4: 04000a93 li s5,64
|
||||
800004a8: 40da8ab3 sub s5,s5,a3
|
||||
800004ac: 00150513 add a0,a0,1
|
||||
800004b0: 01549733 sll a4,s1,s5
|
||||
800004b4: 00a9d7b3 srl a5,s3,a0
|
||||
800004b8: 01599ab3 sll s5,s3,s5
|
||||
800004bc: 00a4d4b3 srl s1,s1,a0
|
||||
800004c0: 00f76833 or a6,a4,a5
|
||||
800004c4: d75ff06f j 80000238 <__udivmoddi4+0xd8>
|
||||
|
||||
800004c8 <__moddi3>:
|
||||
800004c8: fe010113 add sp,sp,-32
|
||||
800004cc: 00812c23 sw s0,24(sp)
|
||||
800004d0: 41f6d893 sra a7,a3,0x1f
|
||||
800004d4: 41f5d413 sra s0,a1,0x1f
|
||||
800004d8: 01164733 xor a4,a2,a7
|
||||
800004dc: 008547b3 xor a5,a0,s0
|
||||
800004e0: 41170633 sub a2,a4,a7
|
||||
800004e4: 40878533 sub a0,a5,s0
|
||||
800004e8: 0116c6b3 xor a3,a3,a7
|
||||
800004ec: 0085c5b3 xor a1,a1,s0
|
||||
800004f0: 00c73833 sltu a6,a4,a2
|
||||
800004f4: 00a7b7b3 sltu a5,a5,a0
|
||||
800004f8: 411686b3 sub a3,a3,a7
|
||||
800004fc: 408585b3 sub a1,a1,s0
|
||||
80000500: 00810713 add a4,sp,8
|
||||
80000504: 40f585b3 sub a1,a1,a5
|
||||
80000508: 410686b3 sub a3,a3,a6
|
||||
8000050c: 00112e23 sw ra,28(sp)
|
||||
80000510: c51ff0ef jal 80000160 <__udivmoddi4>
|
||||
80000514: 00812783 lw a5,8(sp)
|
||||
80000518: 00c12583 lw a1,12(sp)
|
||||
8000051c: 01c12083 lw ra,28(sp)
|
||||
80000520: 0087c7b3 xor a5,a5,s0
|
||||
80000524: 0085c5b3 xor a1,a1,s0
|
||||
80000528: 40878533 sub a0,a5,s0
|
||||
8000052c: 408585b3 sub a1,a1,s0
|
||||
80000530: 01812403 lw s0,24(sp)
|
||||
80000534: 00a7b7b3 sltu a5,a5,a0
|
||||
80000538: 40f585b3 sub a1,a1,a5
|
||||
8000053c: 02010113 add sp,sp,32
|
||||
80000540: 00008067 ret
|
||||
|
||||
80000544 <__clzsi2>:
|
||||
80000544: 000105b7 lui a1,0x10
|
||||
80000548: 00b535b3 sltu a1,a0,a1
|
||||
8000054c: 00459593 sll a1,a1,0x4
|
||||
80000550: 01000793 li a5,16
|
||||
80000554: 40b787b3 sub a5,a5,a1
|
||||
80000558: 00010737 lui a4,0x10
|
||||
8000055c: 00f557b3 srl a5,a0,a5
|
||||
80000560: f0070713 add a4,a4,-256 # ff00 <_entry_offset+0xff00>
|
||||
80000564: 00e7f733 and a4,a5,a4
|
||||
80000568: 00173713 seqz a4,a4
|
||||
8000056c: 00371713 sll a4,a4,0x3
|
||||
80000570: 00800693 li a3,8
|
||||
80000574: 40e686b3 sub a3,a3,a4
|
||||
80000578: 00d7d7b3 srl a5,a5,a3
|
||||
8000057c: 0f07f613 and a2,a5,240
|
||||
80000580: 00163613 seqz a2,a2
|
||||
80000584: 00261613 sll a2,a2,0x2
|
||||
80000588: 00400693 li a3,4
|
||||
8000058c: 40c686b3 sub a3,a3,a2
|
||||
80000590: 00d7d7b3 srl a5,a5,a3
|
||||
80000594: 00c7f693 and a3,a5,12
|
||||
80000598: 0016b693 seqz a3,a3
|
||||
8000059c: 00200513 li a0,2
|
||||
800005a0: 00169693 sll a3,a3,0x1
|
||||
800005a4: 40d50833 sub a6,a0,a3
|
||||
800005a8: 0107d7b3 srl a5,a5,a6
|
||||
800005ac: 0017d813 srl a6,a5,0x1
|
||||
800005b0: 00b70733 add a4,a4,a1
|
||||
800005b4: 00187593 and a1,a6,1
|
||||
800005b8: 00e60633 add a2,a2,a4
|
||||
800005bc: 40f50533 sub a0,a0,a5
|
||||
800005c0: 00058463 beqz a1,800005c8 <__clzsi2+0x84>
|
||||
800005c4: 00000513 li a0,0
|
||||
800005c8: 00c686b3 add a3,a3,a2
|
||||
800005cc: 00d50533 add a0,a0,a3
|
||||
800005d0: 00008067 ret
|
||||
|
||||
800005d4 <__ctzsi2>:
|
||||
800005d4: 01051593 sll a1,a0,0x10
|
||||
800005d8: 0105d593 srl a1,a1,0x10
|
||||
800005dc: 0015b593 seqz a1,a1
|
||||
800005e0: 00459593 sll a1,a1,0x4
|
||||
800005e4: 00b557b3 srl a5,a0,a1
|
||||
800005e8: 0ff7f613 zext.b a2,a5
|
||||
800005ec: 00163613 seqz a2,a2
|
||||
800005f0: 00361613 sll a2,a2,0x3
|
||||
800005f4: 00c7d7b3 srl a5,a5,a2
|
||||
800005f8: 00f7f693 and a3,a5,15
|
||||
800005fc: 0016b693 seqz a3,a3
|
||||
80000600: 00269693 sll a3,a3,0x2
|
||||
80000604: 00d7d7b3 srl a5,a5,a3
|
||||
80000608: 0037f713 and a4,a5,3
|
||||
8000060c: 00173713 seqz a4,a4
|
||||
80000610: 00171713 sll a4,a4,0x1
|
||||
80000614: 00e7d7b3 srl a5,a5,a4
|
||||
80000618: 0017d513 srl a0,a5,0x1
|
||||
8000061c: fff7c793 not a5,a5
|
||||
80000620: 00b60633 add a2,a2,a1
|
||||
80000624: 0017f793 and a5,a5,1
|
||||
80000628: 00157593 and a1,a0,1
|
||||
8000062c: 00200513 li a0,2
|
||||
80000630: 00c686b3 add a3,a3,a2
|
||||
80000634: 40b50533 sub a0,a0,a1
|
||||
80000638: 40f007b3 neg a5,a5
|
||||
8000063c: 00f57533 and a0,a0,a5
|
||||
80000640: 00d70733 add a4,a4,a3
|
||||
80000644: 00e50533 add a0,a0,a4
|
||||
80000648: 00008067 ret
|
BIN
am-kernels/tests/cpu-tests/build/min3-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/min3-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/min3-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/min3-riscv32-nemu.elf
Executable file
Binary file not shown.
109
am-kernels/tests/cpu-tests/build/min3-riscv32-nemu.txt
Normal file
109
am-kernels/tests/cpu-tests/build/min3-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,109 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/min3-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 14c000ef jal 80000158 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 128000ef jal 8000014c <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: fc010113 add sp,sp,-64
|
||||
8000002c: 03612023 sw s6,32(sp)
|
||||
80000030: 00000b17 auipc s6,0x0
|
||||
80000034: 24cb0b13 add s6,s6,588 # 8000027c <test_data>
|
||||
80000038: 02912a23 sw s1,52(sp)
|
||||
8000003c: 03312623 sw s3,44(sp)
|
||||
80000040: 03512223 sw s5,36(sp)
|
||||
80000044: 01712e23 sw s7,28(sp)
|
||||
80000048: 01812c23 sw s8,24(sp)
|
||||
8000004c: 02112e23 sw ra,60(sp)
|
||||
80000050: 02812c23 sw s0,56(sp)
|
||||
80000054: 03212823 sw s2,48(sp)
|
||||
80000058: 03412423 sw s4,40(sp)
|
||||
8000005c: 01912a23 sw s9,20(sp)
|
||||
80000060: 01a12823 sw s10,16(sp)
|
||||
80000064: 01b12623 sw s11,12(sp)
|
||||
80000068: 00000c17 auipc s8,0x0
|
||||
8000006c: 114c0c13 add s8,s8,276 # 8000017c <ans>
|
||||
80000070: 000b0a93 mv s5,s6
|
||||
80000074: 000b0b93 mv s7,s6
|
||||
80000078: 01000993 li s3,16
|
||||
8000007c: 00000497 auipc s1,0x0
|
||||
80000080: 21048493 add s1,s1,528 # 8000028c <_bss_start>
|
||||
80000084: 000baa03 lw s4,0(s7)
|
||||
80000088: ff098413 add s0,s3,-16
|
||||
8000008c: 000c0913 mv s2,s8
|
||||
80000090: 008a87b3 add a5,s5,s0
|
||||
80000094: 0007ac83 lw s9,0(a5)
|
||||
80000098: 019a5463 bge s4,s9,800000a0 <main+0x78>
|
||||
8000009c: 000a0c93 mv s9,s4
|
||||
800000a0: 00090d93 mv s11,s2
|
||||
800000a4: 000b0d13 mv s10,s6
|
||||
800000a8: 000d2503 lw a0,0(s10)
|
||||
800000ac: 00acd463 bge s9,a0,800000b4 <main+0x8c>
|
||||
800000b0: 000c8513 mv a0,s9
|
||||
800000b4: 000da703 lw a4,0(s11)
|
||||
800000b8: 004d0d13 add s10,s10,4
|
||||
800000bc: 004d8d93 add s11,s11,4
|
||||
800000c0: 40e50533 sub a0,a0,a4
|
||||
800000c4: 00153513 seqz a0,a0
|
||||
800000c8: f49ff0ef jal 80000010 <check>
|
||||
800000cc: fda49ee3 bne s1,s10,800000a8 <main+0x80>
|
||||
800000d0: 00100513 li a0,1
|
||||
800000d4: 00440413 add s0,s0,4
|
||||
800000d8: f39ff0ef jal 80000010 <check>
|
||||
800000dc: 01090913 add s2,s2,16
|
||||
800000e0: fb3418e3 bne s0,s3,80000090 <main+0x68>
|
||||
800000e4: 00100513 li a0,1
|
||||
800000e8: f29ff0ef jal 80000010 <check>
|
||||
800000ec: 01040993 add s3,s0,16
|
||||
800000f0: 05000793 li a5,80
|
||||
800000f4: 004b8b93 add s7,s7,4
|
||||
800000f8: 040c0c13 add s8,s8,64
|
||||
800000fc: ff0a8a93 add s5,s5,-16
|
||||
80000100: f8f992e3 bne s3,a5,80000084 <main+0x5c>
|
||||
80000104: 00100513 li a0,1
|
||||
80000108: f09ff0ef jal 80000010 <check>
|
||||
8000010c: 03c12083 lw ra,60(sp)
|
||||
80000110: 03812403 lw s0,56(sp)
|
||||
80000114: 03412483 lw s1,52(sp)
|
||||
80000118: 03012903 lw s2,48(sp)
|
||||
8000011c: 02c12983 lw s3,44(sp)
|
||||
80000120: 02812a03 lw s4,40(sp)
|
||||
80000124: 02412a83 lw s5,36(sp)
|
||||
80000128: 02012b03 lw s6,32(sp)
|
||||
8000012c: 01c12b83 lw s7,28(sp)
|
||||
80000130: 01812c03 lw s8,24(sp)
|
||||
80000134: 01412c83 lw s9,20(sp)
|
||||
80000138: 01012d03 lw s10,16(sp)
|
||||
8000013c: 00c12d83 lw s11,12(sp)
|
||||
80000140: 00000513 li a0,0
|
||||
80000144: 04010113 add sp,sp,64
|
||||
80000148: 00008067 ret
|
||||
|
||||
8000014c <halt>:
|
||||
8000014c: 00050513 mv a0,a0
|
||||
80000150: 00100073 ebreak
|
||||
80000154: 0000006f j 80000154 <halt+0x8>
|
||||
|
||||
80000158 <_trm_init>:
|
||||
80000158: ff010113 add sp,sp,-16
|
||||
8000015c: 00000517 auipc a0,0x0
|
||||
80000160: 01c50513 add a0,a0,28 # 80000178 <_etext>
|
||||
80000164: 00112623 sw ra,12(sp)
|
||||
80000168: ec1ff0ef jal 80000028 <main>
|
||||
8000016c: 00050513 mv a0,a0
|
||||
80000170: 00100073 ebreak
|
||||
80000174: 0000006f j 80000174 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/mov-c-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/mov-c-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/mov-c-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/mov-c-riscv32-nemu.elf
Executable file
Binary file not shown.
90
am-kernels/tests/cpu-tests/build/mov-c-riscv32-nemu.txt
Normal file
90
am-kernels/tests/cpu-tests/build/mov-c-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,90 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/mov-c-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 100000ef jal 8000010c <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 0dc000ef jal 80000100 <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: ff010113 add sp,sp,-16
|
||||
8000002c: 00112623 sw ra,12(sp)
|
||||
80000030: 00812423 sw s0,8(sp)
|
||||
80000034: 00912223 sw s1,4(sp)
|
||||
80000038: 00000417 auipc s0,0x0
|
||||
8000003c: 0f840413 add s0,s0,248 # 80000130 <A>
|
||||
80000040: 00042023 sw zero,0(s0)
|
||||
80000044: 00100793 li a5,1
|
||||
80000048: 00f42223 sw a5,4(s0)
|
||||
8000004c: 00200793 li a5,2
|
||||
80000050: 00f42423 sw a5,8(s0)
|
||||
80000054: 00300793 li a5,3
|
||||
80000058: 00f42623 sw a5,12(s0)
|
||||
8000005c: 00400793 li a5,4
|
||||
80000060: 00f42823 sw a5,16(s0)
|
||||
80000064: 00c42783 lw a5,12(s0)
|
||||
80000068: 00000497 auipc s1,0x0
|
||||
8000006c: 0f048493 add s1,s1,240 # 80000158 <b>
|
||||
80000070: 00f4a023 sw a5,0(s1)
|
||||
80000074: 0004a783 lw a5,0(s1)
|
||||
80000078: 00f42a23 sw a5,20(s0)
|
||||
8000007c: 00042503 lw a0,0(s0)
|
||||
80000080: 00153513 seqz a0,a0
|
||||
80000084: f8dff0ef jal 80000010 <check>
|
||||
80000088: 00442503 lw a0,4(s0)
|
||||
8000008c: fff50513 add a0,a0,-1
|
||||
80000090: 00153513 seqz a0,a0
|
||||
80000094: f7dff0ef jal 80000010 <check>
|
||||
80000098: 00842503 lw a0,8(s0)
|
||||
8000009c: ffe50513 add a0,a0,-2
|
||||
800000a0: 00153513 seqz a0,a0
|
||||
800000a4: f6dff0ef jal 80000010 <check>
|
||||
800000a8: 00c42503 lw a0,12(s0)
|
||||
800000ac: ffd50513 add a0,a0,-3
|
||||
800000b0: 00153513 seqz a0,a0
|
||||
800000b4: f5dff0ef jal 80000010 <check>
|
||||
800000b8: 01042503 lw a0,16(s0)
|
||||
800000bc: ffc50513 add a0,a0,-4
|
||||
800000c0: 00153513 seqz a0,a0
|
||||
800000c4: f4dff0ef jal 80000010 <check>
|
||||
800000c8: 0004a503 lw a0,0(s1)
|
||||
800000cc: ffd50513 add a0,a0,-3
|
||||
800000d0: 00153513 seqz a0,a0
|
||||
800000d4: f3dff0ef jal 80000010 <check>
|
||||
800000d8: 01442503 lw a0,20(s0)
|
||||
800000dc: ffd50513 add a0,a0,-3
|
||||
800000e0: 00153513 seqz a0,a0
|
||||
800000e4: f2dff0ef jal 80000010 <check>
|
||||
800000e8: 00c12083 lw ra,12(sp)
|
||||
800000ec: 00812403 lw s0,8(sp)
|
||||
800000f0: 00412483 lw s1,4(sp)
|
||||
800000f4: 00000513 li a0,0
|
||||
800000f8: 01010113 add sp,sp,16
|
||||
800000fc: 00008067 ret
|
||||
|
||||
80000100 <halt>:
|
||||
80000100: 00050513 mv a0,a0
|
||||
80000104: 00100073 ebreak
|
||||
80000108: 0000006f j 80000108 <halt+0x8>
|
||||
|
||||
8000010c <_trm_init>:
|
||||
8000010c: ff010113 add sp,sp,-16
|
||||
80000110: 00000517 auipc a0,0x0
|
||||
80000114: 01c50513 add a0,a0,28 # 8000012c <_etext>
|
||||
80000118: 00112623 sw ra,12(sp)
|
||||
8000011c: f0dff0ef jal 80000028 <main>
|
||||
80000120: 00050513 mv a0,a0
|
||||
80000124: 00100073 ebreak
|
||||
80000128: 0000006f j 80000128 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/movsx-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/movsx-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/movsx-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/movsx-riscv32-nemu.elf
Executable file
Binary file not shown.
133
am-kernels/tests/cpu-tests/build/movsx-riscv32-nemu.txt
Normal file
133
am-kernels/tests/cpu-tests/build/movsx-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,133 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/movsx-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 1ac000ef jal 800001b8 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 188000ef jal 800001ac <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: ff010113 add sp,sp,-16
|
||||
8000002c: 00112623 sw ra,12(sp)
|
||||
80000030: 00812423 sw s0,8(sp)
|
||||
80000034: 00912223 sw s1,4(sp)
|
||||
80000038: 01212023 sw s2,0(sp)
|
||||
8000003c: 00000417 auipc s0,0x0
|
||||
80000040: 1ac40413 add s0,s0,428 # 800001e8 <A>
|
||||
80000044: 00042023 sw zero,0(s0)
|
||||
80000048: 00100793 li a5,1
|
||||
8000004c: 00f42223 sw a5,4(s0)
|
||||
80000050: 00200793 li a5,2
|
||||
80000054: 00f42423 sw a5,8(s0)
|
||||
80000058: 00300793 li a5,3
|
||||
8000005c: 00f42623 sw a5,12(s0)
|
||||
80000060: 00400793 li a5,4
|
||||
80000064: 00f42823 sw a5,16(s0)
|
||||
80000068: 00c42783 lw a5,12(s0)
|
||||
8000006c: 00000917 auipc s2,0x0
|
||||
80000070: 1a490913 add s2,s2,420 # 80000210 <b>
|
||||
80000074: 00000497 auipc s1,0x0
|
||||
80000078: 16848493 add s1,s1,360 # 800001dc <C>
|
||||
8000007c: 00f92023 sw a5,0(s2)
|
||||
80000080: 00092783 lw a5,0(s2)
|
||||
80000084: 00f42a23 sw a5,20(s0)
|
||||
80000088: 06100793 li a5,97
|
||||
8000008c: 00f48023 sb a5,0(s1)
|
||||
80000090: 0004c503 lbu a0,0(s1)
|
||||
80000094: 01851513 sll a0,a0,0x18
|
||||
80000098: 41855513 sra a0,a0,0x18
|
||||
8000009c: f9f50513 add a0,a0,-97
|
||||
800000a0: 00153513 seqz a0,a0
|
||||
800000a4: f6dff0ef jal 80000010 <check>
|
||||
800000a8: 0004c783 lbu a5,0(s1)
|
||||
800000ac: 01879793 sll a5,a5,0x18
|
||||
800000b0: 4187d793 sra a5,a5,0x18
|
||||
800000b4: 00f480a3 sb a5,1(s1)
|
||||
800000b8: 0014c503 lbu a0,1(s1)
|
||||
800000bc: 01851513 sll a0,a0,0x18
|
||||
800000c0: 41855513 sra a0,a0,0x18
|
||||
800000c4: f9f50513 add a0,a0,-97
|
||||
800000c8: 00153513 seqz a0,a0
|
||||
800000cc: f45ff0ef jal 80000010 <check>
|
||||
800000d0: 0004c783 lbu a5,0(s1)
|
||||
800000d4: 01879793 sll a5,a5,0x18
|
||||
800000d8: 4187d793 sra a5,a5,0x18
|
||||
800000dc: 00f42023 sw a5,0(s0)
|
||||
800000e0: 00042503 lw a0,0(s0)
|
||||
800000e4: f9f50513 add a0,a0,-97
|
||||
800000e8: 00153513 seqz a0,a0
|
||||
800000ec: f25ff0ef jal 80000010 <check>
|
||||
800000f0: f8000793 li a5,-128
|
||||
800000f4: 00f480a3 sb a5,1(s1)
|
||||
800000f8: 0014c783 lbu a5,1(s1)
|
||||
800000fc: 01879793 sll a5,a5,0x18
|
||||
80000100: 4187d793 sra a5,a5,0x18
|
||||
80000104: 00f42023 sw a5,0(s0)
|
||||
80000108: 00442503 lw a0,4(s0)
|
||||
8000010c: fff50513 add a0,a0,-1
|
||||
80000110: 00153513 seqz a0,a0
|
||||
80000114: efdff0ef jal 80000010 <check>
|
||||
80000118: 00842503 lw a0,8(s0)
|
||||
8000011c: ffe50513 add a0,a0,-2
|
||||
80000120: 00153513 seqz a0,a0
|
||||
80000124: eedff0ef jal 80000010 <check>
|
||||
80000128: 00c42503 lw a0,12(s0)
|
||||
8000012c: ffd50513 add a0,a0,-3
|
||||
80000130: 00153513 seqz a0,a0
|
||||
80000134: eddff0ef jal 80000010 <check>
|
||||
80000138: 01042503 lw a0,16(s0)
|
||||
8000013c: ffc50513 add a0,a0,-4
|
||||
80000140: 00153513 seqz a0,a0
|
||||
80000144: ecdff0ef jal 80000010 <check>
|
||||
80000148: 00092503 lw a0,0(s2)
|
||||
8000014c: ffd50513 add a0,a0,-3
|
||||
80000150: 00153513 seqz a0,a0
|
||||
80000154: ebdff0ef jal 80000010 <check>
|
||||
80000158: 01442503 lw a0,20(s0)
|
||||
8000015c: ffd50513 add a0,a0,-3
|
||||
80000160: 00153513 seqz a0,a0
|
||||
80000164: eadff0ef jal 80000010 <check>
|
||||
80000168: 0014c503 lbu a0,1(s1)
|
||||
8000016c: 01851513 sll a0,a0,0x18
|
||||
80000170: 41855513 sra a0,a0,0x18
|
||||
80000174: 08050513 add a0,a0,128
|
||||
80000178: 00153513 seqz a0,a0
|
||||
8000017c: e95ff0ef jal 80000010 <check>
|
||||
80000180: 00042503 lw a0,0(s0)
|
||||
80000184: 08050513 add a0,a0,128
|
||||
80000188: 00153513 seqz a0,a0
|
||||
8000018c: e85ff0ef jal 80000010 <check>
|
||||
80000190: 00c12083 lw ra,12(sp)
|
||||
80000194: 00812403 lw s0,8(sp)
|
||||
80000198: 00412483 lw s1,4(sp)
|
||||
8000019c: 00012903 lw s2,0(sp)
|
||||
800001a0: 00000513 li a0,0
|
||||
800001a4: 01010113 add sp,sp,16
|
||||
800001a8: 00008067 ret
|
||||
|
||||
800001ac <halt>:
|
||||
800001ac: 00050513 mv a0,a0
|
||||
800001b0: 00100073 ebreak
|
||||
800001b4: 0000006f j 800001b4 <halt+0x8>
|
||||
|
||||
800001b8 <_trm_init>:
|
||||
800001b8: ff010113 add sp,sp,-16
|
||||
800001bc: 00000517 auipc a0,0x0
|
||||
800001c0: 01c50513 add a0,a0,28 # 800001d8 <_etext>
|
||||
800001c4: 00112623 sw ra,12(sp)
|
||||
800001c8: e61ff0ef jal 80000028 <main>
|
||||
800001cc: 00050513 mv a0,a0
|
||||
800001d0: 00100073 ebreak
|
||||
800001d4: 0000006f j 800001d4 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/mul-longlong-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/mul-longlong-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/mul-longlong-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/mul-longlong-riscv32-nemu.elf
Executable file
Binary file not shown.
|
@ -0,0 +1,95 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/mul-longlong-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 114000ef jal 80000120 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 0f0000ef jal 80000114 <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: fd010113 add sp,sp,-48
|
||||
8000002c: 02912223 sw s1,36(sp)
|
||||
80000030: 03212023 sw s2,32(sp)
|
||||
80000034: 01312e23 sw s3,28(sp)
|
||||
80000038: 01412c23 sw s4,24(sp)
|
||||
8000003c: 01512a23 sw s5,20(sp)
|
||||
80000040: 01612823 sw s6,16(sp)
|
||||
80000044: 02112623 sw ra,44(sp)
|
||||
80000048: 02812423 sw s0,40(sp)
|
||||
8000004c: 01712623 sw s7,12(sp)
|
||||
80000050: 01812423 sw s8,8(sp)
|
||||
80000054: 00000a17 auipc s4,0x0
|
||||
80000058: 144a0a13 add s4,s4,324 # 80000198 <test_data>
|
||||
8000005c: 00000493 li s1,0
|
||||
80000060: 00000993 li s3,0
|
||||
80000064: 00000b17 auipc s6,0x0
|
||||
80000068: 0e4b0b13 add s6,s6,228 # 80000148 <ans>
|
||||
8000006c: 00000917 auipc s2,0x0
|
||||
80000070: 13c90913 add s2,s2,316 # 800001a8 <_bss_start>
|
||||
80000074: 00400a93 li s5,4
|
||||
80000078: 000a2c03 lw s8,0(s4)
|
||||
8000007c: 00349413 sll s0,s1,0x3
|
||||
80000080: 008b0433 add s0,s6,s0
|
||||
80000084: 000a0b93 mv s7,s4
|
||||
80000088: 000ba783 lw a5,0(s7)
|
||||
8000008c: 00442703 lw a4,4(s0)
|
||||
80000090: 00042503 lw a0,0(s0)
|
||||
80000094: 02fc06b3 mul a3,s8,a5
|
||||
80000098: 004b8b93 add s7,s7,4
|
||||
8000009c: 00840413 add s0,s0,8
|
||||
800000a0: 02fc17b3 mulh a5,s8,a5
|
||||
800000a4: 00d54533 xor a0,a0,a3
|
||||
800000a8: 00f747b3 xor a5,a4,a5
|
||||
800000ac: 00f56533 or a0,a0,a5
|
||||
800000b0: 00153513 seqz a0,a0
|
||||
800000b4: f5dff0ef jal 80000010 <check>
|
||||
800000b8: fd7918e3 bne s2,s7,80000088 <main+0x60>
|
||||
800000bc: 00448493 add s1,s1,4
|
||||
800000c0: 00100513 li a0,1
|
||||
800000c4: 413484b3 sub s1,s1,s3
|
||||
800000c8: 00198993 add s3,s3,1
|
||||
800000cc: f45ff0ef jal 80000010 <check>
|
||||
800000d0: 004a0a13 add s4,s4,4
|
||||
800000d4: fb5992e3 bne s3,s5,80000078 <main+0x50>
|
||||
800000d8: 00100513 li a0,1
|
||||
800000dc: f35ff0ef jal 80000010 <check>
|
||||
800000e0: 02c12083 lw ra,44(sp)
|
||||
800000e4: 02812403 lw s0,40(sp)
|
||||
800000e8: 02412483 lw s1,36(sp)
|
||||
800000ec: 02012903 lw s2,32(sp)
|
||||
800000f0: 01c12983 lw s3,28(sp)
|
||||
800000f4: 01812a03 lw s4,24(sp)
|
||||
800000f8: 01412a83 lw s5,20(sp)
|
||||
800000fc: 01012b03 lw s6,16(sp)
|
||||
80000100: 00c12b83 lw s7,12(sp)
|
||||
80000104: 00812c03 lw s8,8(sp)
|
||||
80000108: 00000513 li a0,0
|
||||
8000010c: 03010113 add sp,sp,48
|
||||
80000110: 00008067 ret
|
||||
|
||||
80000114 <halt>:
|
||||
80000114: 00050513 mv a0,a0
|
||||
80000118: 00100073 ebreak
|
||||
8000011c: 0000006f j 8000011c <halt+0x8>
|
||||
|
||||
80000120 <_trm_init>:
|
||||
80000120: ff010113 add sp,sp,-16
|
||||
80000124: 00000517 auipc a0,0x0
|
||||
80000128: 01c50513 add a0,a0,28 # 80000140 <_etext>
|
||||
8000012c: 00112623 sw ra,12(sp)
|
||||
80000130: ef9ff0ef jal 80000028 <main>
|
||||
80000134: 00050513 mv a0,a0
|
||||
80000138: 00100073 ebreak
|
||||
8000013c: 0000006f j 8000013c <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/pascal-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/pascal-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/pascal-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/pascal-riscv32-nemu.elf
Executable file
Binary file not shown.
82
am-kernels/tests/cpu-tests/build/pascal-riscv32-nemu.txt
Normal file
82
am-kernels/tests/cpu-tests/build/pascal-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,82 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/pascal-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 0e0000ef jal 800000ec <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 0bc000ef jal 800000e0 <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: ff010113 add sp,sp,-16
|
||||
8000002c: 00812423 sw s0,8(sp)
|
||||
80000030: 01212023 sw s2,0(sp)
|
||||
80000034: 00112623 sw ra,12(sp)
|
||||
80000038: 00912223 sw s1,4(sp)
|
||||
8000003c: 00000417 auipc s0,0x0
|
||||
80000040: 15040413 add s0,s0,336 # 8000018c <a>
|
||||
80000044: 00100793 li a5,1
|
||||
80000048: 00f42223 sw a5,4(s0)
|
||||
8000004c: 00f42023 sw a5,0(s0)
|
||||
80000050: 00000617 auipc a2,0x0
|
||||
80000054: 14460613 add a2,a2,324 # 80000194 <a+0x8>
|
||||
80000058: 00000917 auipc s2,0x0
|
||||
8000005c: 1b090913 add s2,s2,432 # 80000208 <a+0x7c>
|
||||
80000060: 00100593 li a1,1
|
||||
80000064: 00000797 auipc a5,0x0
|
||||
80000068: 12c78793 add a5,a5,300 # 80000190 <a+0x4>
|
||||
8000006c: 00100693 li a3,1
|
||||
80000070: 00068713 mv a4,a3
|
||||
80000074: 0007a683 lw a3,0(a5)
|
||||
80000078: 00478793 add a5,a5,4
|
||||
8000007c: 00e68733 add a4,a3,a4
|
||||
80000080: fee7ae23 sw a4,-4(a5)
|
||||
80000084: fec796e3 bne a5,a2,80000070 <main+0x48>
|
||||
80000088: 00b7a023 sw a1,0(a5)
|
||||
8000008c: 00478613 add a2,a5,4
|
||||
80000090: fd261ae3 bne a2,s2,80000064 <main+0x3c>
|
||||
80000094: 00000497 auipc s1,0x0
|
||||
80000098: 07c48493 add s1,s1,124 # 80000110 <ans>
|
||||
8000009c: 0004a783 lw a5,0(s1)
|
||||
800000a0: 00042503 lw a0,0(s0)
|
||||
800000a4: 00440413 add s0,s0,4
|
||||
800000a8: 00448493 add s1,s1,4
|
||||
800000ac: 40f50533 sub a0,a0,a5
|
||||
800000b0: 00153513 seqz a0,a0
|
||||
800000b4: f5dff0ef jal 80000010 <check>
|
||||
800000b8: ff2412e3 bne s0,s2,8000009c <main+0x74>
|
||||
800000bc: 00100513 li a0,1
|
||||
800000c0: f51ff0ef jal 80000010 <check>
|
||||
800000c4: 00c12083 lw ra,12(sp)
|
||||
800000c8: 00812403 lw s0,8(sp)
|
||||
800000cc: 00412483 lw s1,4(sp)
|
||||
800000d0: 00012903 lw s2,0(sp)
|
||||
800000d4: 00000513 li a0,0
|
||||
800000d8: 01010113 add sp,sp,16
|
||||
800000dc: 00008067 ret
|
||||
|
||||
800000e0 <halt>:
|
||||
800000e0: 00050513 mv a0,a0
|
||||
800000e4: 00100073 ebreak
|
||||
800000e8: 0000006f j 800000e8 <halt+0x8>
|
||||
|
||||
800000ec <_trm_init>:
|
||||
800000ec: ff010113 add sp,sp,-16
|
||||
800000f0: 00000517 auipc a0,0x0
|
||||
800000f4: 01c50513 add a0,a0,28 # 8000010c <_etext>
|
||||
800000f8: 00112623 sw ra,12(sp)
|
||||
800000fc: f2dff0ef jal 80000028 <main>
|
||||
80000100: 00050513 mv a0,a0
|
||||
80000104: 00100073 ebreak
|
||||
80000108: 0000006f j 80000108 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/prime-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/prime-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/prime-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/prime-riscv32-nemu.elf
Executable file
Binary file not shown.
73
am-kernels/tests/cpu-tests/build/prime-riscv32-nemu.txt
Normal file
73
am-kernels/tests/cpu-tests/build/prime-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,73 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/prime-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 0bc000ef jal 800000c8 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 098000ef jal 800000bc <halt>
|
||||
|
||||
80000028 <main>:
|
||||
80000028: fe010113 add sp,sp,-32
|
||||
8000002c: 00812c23 sw s0,24(sp)
|
||||
80000030: 00912a23 sw s1,20(sp)
|
||||
80000034: 01212823 sw s2,16(sp)
|
||||
80000038: 01312623 sw s3,12(sp)
|
||||
8000003c: 00112e23 sw ra,28(sp)
|
||||
80000040: 00000493 li s1,0
|
||||
80000044: 06500413 li s0,101
|
||||
80000048: 00000997 auipc s3,0x0
|
||||
8000004c: 0a498993 add s3,s3,164 # 800000ec <ans>
|
||||
80000050: 09700913 li s2,151
|
||||
80000054: 00200793 li a5,2
|
||||
80000058: 00c0006f j 80000064 <main+0x3c>
|
||||
8000005c: 02f46733 rem a4,s0,a5
|
||||
80000060: 02070463 beqz a4,80000088 <main+0x60>
|
||||
80000064: 00178793 add a5,a5,1
|
||||
80000068: fe879ae3 bne a5,s0,8000005c <main+0x34>
|
||||
8000006c: 00249793 sll a5,s1,0x2
|
||||
80000070: 00f987b3 add a5,s3,a5
|
||||
80000074: 0007a503 lw a0,0(a5)
|
||||
80000078: 00148493 add s1,s1,1
|
||||
8000007c: 40850533 sub a0,a0,s0
|
||||
80000080: 00153513 seqz a0,a0
|
||||
80000084: f8dff0ef jal 80000010 <check>
|
||||
80000088: 00240413 add s0,s0,2
|
||||
8000008c: fd2414e3 bne s0,s2,80000054 <main+0x2c>
|
||||
80000090: ff648513 add a0,s1,-10
|
||||
80000094: 00153513 seqz a0,a0
|
||||
80000098: f79ff0ef jal 80000010 <check>
|
||||
8000009c: 01c12083 lw ra,28(sp)
|
||||
800000a0: 01812403 lw s0,24(sp)
|
||||
800000a4: 01412483 lw s1,20(sp)
|
||||
800000a8: 01012903 lw s2,16(sp)
|
||||
800000ac: 00c12983 lw s3,12(sp)
|
||||
800000b0: 00000513 li a0,0
|
||||
800000b4: 02010113 add sp,sp,32
|
||||
800000b8: 00008067 ret
|
||||
|
||||
800000bc <halt>:
|
||||
800000bc: 00050513 mv a0,a0
|
||||
800000c0: 00100073 ebreak
|
||||
800000c4: 0000006f j 800000c4 <halt+0x8>
|
||||
|
||||
800000c8 <_trm_init>:
|
||||
800000c8: ff010113 add sp,sp,-16
|
||||
800000cc: 00000517 auipc a0,0x0
|
||||
800000d0: 01c50513 add a0,a0,28 # 800000e8 <_etext>
|
||||
800000d4: 00112623 sw ra,12(sp)
|
||||
800000d8: f51ff0ef jal 80000028 <main>
|
||||
800000dc: 00050513 mv a0,a0
|
||||
800000e0: 00100073 ebreak
|
||||
800000e4: 0000006f j 800000e4 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/quick-sort-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/quick-sort-riscv32-nemu.bin
Executable file
Binary file not shown.
BIN
am-kernels/tests/cpu-tests/build/quick-sort-riscv32-nemu.elf
Executable file
BIN
am-kernels/tests/cpu-tests/build/quick-sort-riscv32-nemu.elf
Executable file
Binary file not shown.
265
am-kernels/tests/cpu-tests/build/quick-sort-riscv32-nemu.txt
Normal file
265
am-kernels/tests/cpu-tests/build/quick-sort-riscv32-nemu.txt
Normal file
|
@ -0,0 +1,265 @@
|
|||
|
||||
/home/xin/repo/ysyx-workbench/am-kernels/tests/cpu-tests/build/quick-sort-riscv32-nemu.elf: file format elf32-littleriscv
|
||||
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
80000000 <_start>:
|
||||
80000000: 00000413 li s0,0
|
||||
80000004: 00009117 auipc sp,0x9
|
||||
80000008: ffc10113 add sp,sp,-4 # 80009000 <_end>
|
||||
8000000c: 3ac000ef jal 800003b8 <_trm_init>
|
||||
|
||||
80000010 <check>:
|
||||
80000010: 00050463 beqz a0,80000018 <check+0x8>
|
||||
80000014: 00008067 ret
|
||||
80000018: ff010113 add sp,sp,-16
|
||||
8000001c: 00100513 li a0,1
|
||||
80000020: 00112623 sw ra,12(sp)
|
||||
80000024: 388000ef jal 800003ac <halt>
|
||||
|
||||
80000028 <partition>:
|
||||
80000028: 00259693 sll a3,a1,0x2
|
||||
8000002c: 00d506b3 add a3,a0,a3
|
||||
80000030: 00050893 mv a7,a0
|
||||
80000034: 0006a803 lw a6,0(a3)
|
||||
80000038: 00060513 mv a0,a2
|
||||
8000003c: 06c5dc63 bge a1,a2,800000b4 <partition+0x8c>
|
||||
80000040: 00261793 sll a5,a2,0x2
|
||||
80000044: 00f887b3 add a5,a7,a5
|
||||
80000048: 0007a783 lw a5,0(a5)
|
||||
8000004c: fff50613 add a2,a0,-1
|
||||
80000050: 00261613 sll a2,a2,0x2
|
||||
80000054: 00c88633 add a2,a7,a2
|
||||
80000058: 0140006f j 8000006c <partition+0x44>
|
||||
8000005c: fff50513 add a0,a0,-1
|
||||
80000060: 00472783 lw a5,4(a4)
|
||||
80000064: 06b50863 beq a0,a1,800000d4 <partition+0xac>
|
||||
80000068: 00070613 mv a2,a4
|
||||
8000006c: ffc60713 add a4,a2,-4
|
||||
80000070: fef846e3 blt a6,a5,8000005c <partition+0x34>
|
||||
80000074: 00259693 sll a3,a1,0x2
|
||||
80000078: 00d886b3 add a3,a7,a3
|
||||
8000007c: 00251313 sll t1,a0,0x2
|
||||
80000080: 00f6a023 sw a5,0(a3)
|
||||
80000084: 00688633 add a2,a7,t1
|
||||
80000088: 04a5de63 bge a1,a0,800000e4 <partition+0xbc>
|
||||
8000008c: 00068713 mv a4,a3
|
||||
80000090: 00c0006f j 8000009c <partition+0x74>
|
||||
80000094: 00158593 add a1,a1,1
|
||||
80000098: 02a58463 beq a1,a0,800000c0 <partition+0x98>
|
||||
8000009c: 00072783 lw a5,0(a4)
|
||||
800000a0: 00070693 mv a3,a4
|
||||
800000a4: 00470713 add a4,a4,4
|
||||
800000a8: fef856e3 bge a6,a5,80000094 <partition+0x6c>
|
||||
800000ac: 00f62023 sw a5,0(a2)
|
||||
800000b0: f8a5cee3 blt a1,a0,8000004c <partition+0x24>
|
||||
800000b4: 00058513 mv a0,a1
|
||||
800000b8: 0106a023 sw a6,0(a3)
|
||||
800000bc: 00008067 ret
|
||||
800000c0: 006886b3 add a3,a7,t1
|
||||
800000c4: 0006a783 lw a5,0(a3)
|
||||
800000c8: 00f62023 sw a5,0(a2)
|
||||
800000cc: 0106a023 sw a6,0(a3)
|
||||
800000d0: 00008067 ret
|
||||
800000d4: 00251693 sll a3,a0,0x2
|
||||
800000d8: 00d886b3 add a3,a7,a3
|
||||
800000dc: 00f6a023 sw a5,0(a3)
|
||||
800000e0: fe9ff06f j 800000c8 <partition+0xa0>
|
||||
800000e4: 00058513 mv a0,a1
|
||||
800000e8: fe1ff06f j 800000c8 <partition+0xa0>
|
||||
|
||||
800000ec <quick_sort>:
|
||||
800000ec: 1ec5dc63 bge a1,a2,800002e4 <quick_sort+0x1f8>
|
||||
800000f0: fa010113 add sp,sp,-96
|
||||
800000f4: 04812c23 sw s0,88(sp)
|
||||
800000f8: 05612023 sw s6,64(sp)
|
||||
800000fc: 03812c23 sw s8,56(sp)
|
||||
80000100: 04112e23 sw ra,92(sp)
|
||||
80000104: 03912a23 sw s9,52(sp)
|
||||
80000108: 00058c13 mv s8,a1
|
||||
8000010c: 00060b13 mv s6,a2
|
||||
80000110: 00050413 mv s0,a0
|
||||
80000114: 000b0613 mv a2,s6
|
||||
80000118: 000c0593 mv a1,s8
|
||||
8000011c: 00040513 mv a0,s0
|
||||
80000120: f09ff0ef jal 80000028 <partition>
|
||||
80000124: 00a12023 sw a0,0(sp)
|
||||
80000128: fff50c93 add s9,a0,-1
|
||||
8000012c: 199c5863 bge s8,s9,800002bc <quick_sort+0x1d0>
|
||||
80000130: 04912a23 sw s1,84(sp)
|
||||
80000134: 05212823 sw s2,80(sp)
|
||||
80000138: 05312623 sw s3,76(sp)
|
||||
8000013c: 03a12823 sw s10,48(sp)
|
||||
80000140: 03b12623 sw s11,44(sp)
|
||||
80000144: 000c8613 mv a2,s9
|
||||
80000148: 000c0593 mv a1,s8
|
||||
8000014c: 00040513 mv a0,s0
|
||||
80000150: ed9ff0ef jal 80000028 <partition>
|
||||
80000154: 00a12223 sw a0,4(sp)
|
||||
80000158: fff50d13 add s10,a0,-1
|
||||
8000015c: 15ac5063 bge s8,s10,8000029c <quick_sort+0x1b0>
|
||||
80000160: 000d0613 mv a2,s10
|
||||
80000164: 000c0593 mv a1,s8
|
||||
80000168: 00040513 mv a0,s0
|
||||
8000016c: ebdff0ef jal 80000028 <partition>
|
||||
80000170: 00a12423 sw a0,8(sp)
|
||||
80000174: fff50d93 add s11,a0,-1
|
||||
80000178: 11bc5c63 bge s8,s11,80000290 <quick_sort+0x1a4>
|
||||
8000017c: 000d8613 mv a2,s11
|
||||
80000180: 000c0593 mv a1,s8
|
||||
80000184: 00040513 mv a0,s0
|
||||
80000188: ea1ff0ef jal 80000028 <partition>
|
||||
8000018c: 00a12623 sw a0,12(sp)
|
||||
80000190: fff50993 add s3,a0,-1
|
||||
80000194: 0f3c5863 bge s8,s3,80000284 <quick_sort+0x198>
|
||||
80000198: 00098613 mv a2,s3
|
||||
8000019c: 000c0593 mv a1,s8
|
||||
800001a0: 00040513 mv a0,s0
|
||||
800001a4: e85ff0ef jal 80000028 <partition>
|
||||
800001a8: fff50913 add s2,a0,-1
|
||||
800001ac: 00050493 mv s1,a0
|
||||
800001b0: 0d2c5663 bge s8,s2,8000027c <quick_sort+0x190>
|
||||
800001b4: 05412423 sw s4,72(sp)
|
||||
800001b8: 03712e23 sw s7,60(sp)
|
||||
800001bc: 00090613 mv a2,s2
|
||||
800001c0: 000c0593 mv a1,s8
|
||||
800001c4: 00040513 mv a0,s0
|
||||
800001c8: e61ff0ef jal 80000028 <partition>
|
||||
800001cc: fff50b93 add s7,a0,-1
|
||||
800001d0: 00050a13 mv s4,a0
|
||||
800001d4: 097c5c63 bge s8,s7,8000026c <quick_sort+0x180>
|
||||
800001d8: 05512223 sw s5,68(sp)
|
||||
800001dc: 000b8613 mv a2,s7
|
||||
800001e0: 000c0593 mv a1,s8
|
||||
800001e4: 00040513 mv a0,s0
|
||||
800001e8: e41ff0ef jal 80000028 <partition>
|
||||
800001ec: 00a12823 sw a0,16(sp)
|
||||
800001f0: fff50a93 add s5,a0,-1
|
||||
800001f4: 075c5463 bge s8,s5,8000025c <quick_sort+0x170>
|
||||
800001f8: 000a8613 mv a2,s5
|
||||
800001fc: 000c0593 mv a1,s8
|
||||
80000200: 00040513 mv a0,s0
|
||||
80000204: e25ff0ef jal 80000028 <partition>
|
||||
80000208: fff50713 add a4,a0,-1
|
||||
8000020c: 00050793 mv a5,a0
|
||||
80000210: 04ec5263 bge s8,a4,80000254 <quick_sort+0x168>
|
||||
80000214: 00070613 mv a2,a4
|
||||
80000218: 000c0593 mv a1,s8
|
||||
8000021c: 00040513 mv a0,s0
|
||||
80000220: 00f12e23 sw a5,28(sp)
|
||||
80000224: 00e12c23 sw a4,24(sp)
|
||||
80000228: e01ff0ef jal 80000028 <partition>
|
||||
8000022c: fff50613 add a2,a0,-1
|
||||
80000230: 00a12a23 sw a0,20(sp)
|
||||
80000234: 000c0593 mv a1,s8
|
||||
80000238: 00040513 mv a0,s0
|
||||
8000023c: eb1ff0ef jal 800000ec <quick_sort>
|
||||
80000240: 01412683 lw a3,20(sp)
|
||||
80000244: 01812703 lw a4,24(sp)
|
||||
80000248: 01c12783 lw a5,28(sp)
|
||||
8000024c: 00168c13 add s8,a3,1
|
||||
80000250: fcec42e3 blt s8,a4,80000214 <quick_sort+0x128>
|
||||
80000254: 00178c13 add s8,a5,1
|
||||
80000258: fb5c40e3 blt s8,s5,800001f8 <quick_sort+0x10c>
|
||||
8000025c: 01012783 lw a5,16(sp)
|
||||
80000260: 00178c13 add s8,a5,1
|
||||
80000264: f77c4ce3 blt s8,s7,800001dc <quick_sort+0xf0>
|
||||
80000268: 04412a83 lw s5,68(sp)
|
||||
8000026c: 001a0c13 add s8,s4,1
|
||||
80000270: f52c46e3 blt s8,s2,800001bc <quick_sort+0xd0>
|
||||
80000274: 04812a03 lw s4,72(sp)
|
||||
80000278: 03c12b83 lw s7,60(sp)
|
||||
8000027c: 00148c13 add s8,s1,1
|
||||
80000280: f13c4ce3 blt s8,s3,80000198 <quick_sort+0xac>
|
||||
80000284: 00c12783 lw a5,12(sp)
|
||||
80000288: 00178c13 add s8,a5,1
|
||||
8000028c: efbc48e3 blt s8,s11,8000017c <quick_sort+0x90>
|
||||
80000290: 00812783 lw a5,8(sp)
|
||||
80000294: 00178c13 add s8,a5,1
|
||||
80000298: edac44e3 blt s8,s10,80000160 <quick_sort+0x74>
|
||||
8000029c: 00412783 lw a5,4(sp)
|
||||
800002a0: 00178c13 add s8,a5,1
|
||||
800002a4: eb9c40e3 blt s8,s9,80000144 <quick_sort+0x58>
|
||||
800002a8: 05412483 lw s1,84(sp)
|
||||
800002ac: 05012903 lw s2,80(sp)
|
||||
800002b0: 04c12983 lw s3,76(sp)
|
||||
800002b4: 03012d03 lw s10,48(sp)
|
||||
800002b8: 02c12d83 lw s11,44(sp)
|
||||
800002bc: 00012783 lw a5,0(sp)
|
||||
800002c0: 00178c13 add s8,a5,1
|
||||
800002c4: e56c48e3 blt s8,s6,80000114 <quick_sort+0x28>
|
||||
800002c8: 05c12083 lw ra,92(sp)
|
||||
800002cc: 05812403 lw s0,88(sp)
|
||||
800002d0: 04012b03 lw s6,64(sp)
|
||||
800002d4: 03812c03 lw s8,56(sp)
|
||||
800002d8: 03412c83 lw s9,52(sp)
|
||||
800002dc: 06010113 add sp,sp,96
|
||||
800002e0: 00008067 ret
|
||||
800002e4: 00008067 ret
|
||||
|
||||
800002e8 <main>:
|
||||
800002e8: fe010113 add sp,sp,-32
|
||||
800002ec: 00912a23 sw s1,20(sp)
|
||||
800002f0: 01300613 li a2,19
|
||||
800002f4: 00000593 li a1,0
|
||||
800002f8: 00000517 auipc a0,0x0
|
||||
800002fc: 0e450513 add a0,a0,228 # 800003dc <a>
|
||||
80000300: 00000497 auipc s1,0x0
|
||||
80000304: 0dc48493 add s1,s1,220 # 800003dc <a>
|
||||
80000308: 00812c23 sw s0,24(sp)
|
||||
8000030c: 01212823 sw s2,16(sp)
|
||||
80000310: 01312623 sw s3,12(sp)
|
||||
80000314: 00112e23 sw ra,28(sp)
|
||||
80000318: 00048913 mv s2,s1
|
||||
8000031c: dd1ff0ef jal 800000ec <quick_sort>
|
||||
80000320: 00000413 li s0,0
|
||||
80000324: 01400993 li s3,20
|
||||
80000328: 00092503 lw a0,0(s2)
|
||||
8000032c: 00490913 add s2,s2,4
|
||||
80000330: 40850533 sub a0,a0,s0
|
||||
80000334: 00153513 seqz a0,a0
|
||||
80000338: 00140413 add s0,s0,1
|
||||
8000033c: cd5ff0ef jal 80000010 <check>
|
||||
80000340: ff3414e3 bne s0,s3,80000328 <main+0x40>
|
||||
80000344: 00100513 li a0,1
|
||||
80000348: cc9ff0ef jal 80000010 <check>
|
||||
8000034c: 01300613 li a2,19
|
||||
80000350: 00000593 li a1,0
|
||||
80000354: 00000517 auipc a0,0x0
|
||||
80000358: 08850513 add a0,a0,136 # 800003dc <a>
|
||||
8000035c: d91ff0ef jal 800000ec <quick_sort>
|
||||
80000360: 00000413 li s0,0
|
||||
80000364: 01400913 li s2,20
|
||||
80000368: 0004a503 lw a0,0(s1)
|
||||
8000036c: 00448493 add s1,s1,4
|
||||
80000370: 40850533 sub a0,a0,s0
|
||||
80000374: 00153513 seqz a0,a0
|
||||
80000378: 00140413 add s0,s0,1
|
||||
8000037c: c95ff0ef jal 80000010 <check>
|
||||
80000380: ff2414e3 bne s0,s2,80000368 <main+0x80>
|
||||
80000384: 00100513 li a0,1
|
||||
80000388: c89ff0ef jal 80000010 <check>
|
||||
8000038c: 01c12083 lw ra,28(sp)
|
||||
80000390: 01812403 lw s0,24(sp)
|
||||
80000394: 01412483 lw s1,20(sp)
|
||||
80000398: 01012903 lw s2,16(sp)
|
||||
8000039c: 00c12983 lw s3,12(sp)
|
||||
800003a0: 00000513 li a0,0
|
||||
800003a4: 02010113 add sp,sp,32
|
||||
800003a8: 00008067 ret
|
||||
|
||||
800003ac <halt>:
|
||||
800003ac: 00050513 mv a0,a0
|
||||
800003b0: 00100073 ebreak
|
||||
800003b4: 0000006f j 800003b4 <halt+0x8>
|
||||
|
||||
800003b8 <_trm_init>:
|
||||
800003b8: ff010113 add sp,sp,-16
|
||||
800003bc: 00000517 auipc a0,0x0
|
||||
800003c0: 01c50513 add a0,a0,28 # 800003d8 <_etext>
|
||||
800003c4: 00112623 sw ra,12(sp)
|
||||
800003c8: f21ff0ef jal 800002e8 <main>
|
||||
800003cc: 00050513 mv a0,a0
|
||||
800003d0: 00100073 ebreak
|
||||
800003d4: 0000006f j 800003d4 <_trm_init+0x1c>
|
BIN
am-kernels/tests/cpu-tests/build/recursion-riscv32-nemu.bin
Executable file
BIN
am-kernels/tests/cpu-tests/build/recursion-riscv32-nemu.bin
Executable file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue