OpenCores
URL https://opencores.org/ocsvn/r2000/r2000/trunk

Subversion Repositories r2000

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /r2000
    from Rev 28 to Rev 29
    Reverse comparison

Rev 28 → Rev 29

/trunk/r2000sc/doc/Instructions.xls Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream
trunk/r2000sc/doc/Instructions.xls Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: trunk/r2000sc/doc/MipsR2000-SingleCycle.tif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/r2000sc/doc/MipsR2000-SingleCycle.tif =================================================================== --- trunk/r2000sc/doc/MipsR2000-SingleCycle.tif (revision 28) +++ trunk/r2000sc/doc/MipsR2000-SingleCycle.tif (nonexistent)
trunk/r2000sc/doc/MipsR2000-SingleCycle.tif Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: trunk/r2000sc/doc/Thumbs.db =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/r2000sc/doc/Thumbs.db =================================================================== --- trunk/r2000sc/doc/Thumbs.db (revision 28) +++ trunk/r2000sc/doc/Thumbs.db (nonexistent)
trunk/r2000sc/doc/Thumbs.db Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: trunk/r2000sc/doc/MipsR2000-SingleCycle-rev1.tif =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/octet-stream Index: trunk/r2000sc/doc/MipsR2000-SingleCycle-rev1.tif =================================================================== --- trunk/r2000sc/doc/MipsR2000-SingleCycle-rev1.tif (revision 28) +++ trunk/r2000sc/doc/MipsR2000-SingleCycle-rev1.tif (nonexistent)
trunk/r2000sc/doc/MipsR2000-SingleCycle-rev1.tif Property changes : Deleted: svn:mime-type ## -1 +0,0 ## -application/octet-stream \ No newline at end of property Index: trunk/Soft/src/C/reed solomon/compile.bat =================================================================== --- trunk/Soft/src/C/reed solomon/compile.bat (revision 28) +++ trunk/Soft/src/C/reed solomon/compile.bat (nonexistent) @@ -1,30 +0,0 @@ -path; -path=..\..\..\gccmips_elf - -set libpath=..\..\..\lib -set incpath=..\..\..\inc -set toolpath=..\..\..\tools -set codepath=..\..\..\..\r2000pl\bench\code - -as -o boot.o %libpath%\src\plasmaboot.s - -gcc -O2 -O -Dmain=main2 -Wall -S rs_tak.c -gcc -O2 -O -Dmain=main2 -Wall -c -s rs_tak.c - -rem reloacatable -r -ld -Ttext 0 -eentry -Map rs_tak.map -r -s -N -o test.exe boot.o rs_tak.o -objdump --disassemble-all test.exe > rs_tak.lst - -ld -Ttext 0 -eentry -Map rs_tak.map -s -N -o test.exe boot.o rs_tak.o -rem objdump --disassemble-all test.exe > rs_tak.lst - -rem %toolpath%\convert_bin rs_tak -%toolpath%\convert_mips rs_tak - -rem use convert_bin for *.bin but the code is not the same as convert_mips -rem must add the *.bin generation in convert_mips. the difference is with sp Stack Pointer -rem %toolpath%\mlite test.bin BD > test.txt - -rem %toolpath%\mlite test.bin - -move /Y *.txt %codepath% \ No newline at end of file Index: trunk/Soft/src/C/reed solomon/rs_tak_CHECK_UART_STATUS.s =================================================================== --- trunk/Soft/src/C/reed solomon/rs_tak_CHECK_UART_STATUS.s (revision 28) +++ trunk/Soft/src/C/reed solomon/rs_tak_CHECK_UART_STATUS.s (nonexistent) @@ -1,2491 +0,0 @@ - .file 1 "rs_tak.c" - - # -G value = 8, Cpu = 3000, ISA = 1 - # GNU C version egcs-2.90.23 980102 (egcs-1.0.1 release) (sde) [AL 1.1, MM 40] Algorithmics SDE-MIPS v4.0.5 compiled by GNU C version egcs-2.91.57 19980901 (egcs-1.1 release). - # options passed: -O2 -O -Wall - # options enabled: -fdefer-pop -fomit-frame-pointer -fthread-jumps - # -fpeephole -finline -fkeep-static-consts -fpcc-struct-return - # -fdelayed-branch -fcommon -fverbose-asm -fgnu-linker -falias-check - # -fargument-alias -msplit-addresses -mgas -mrnames -mgpOPT -mgpopt - # -membedded-data -meb -mmad -marg32 -mdebugh -mdebugi -mmadd -mno-gpconst - # -mcpu=3000 - -gcc2_compiled.: - .sdata - .align 0 - .align 2 -lfsr_state: - .size lfsr_state,4 - .word 1 - .globl Pp - .data - .align 0 - .align 2 -Pp: - .size Pp,36 - .word 1 - .word 0 - .word 1 - .word 1 - .word 1 - .word 0 - .word 0 - .word 0 - .word 1 - .rdata - .align 0 - .align 2 -.LC0: - .ascii "It takes very long time for RTL Simulation.\000" - .align 2 -.LC1: - .ascii "Reed-Solomon code is \000" - .align 2 -.LC2: - .ascii " \000" - .align 2 -.LC3: - .ascii "over GF(\000" - .align 2 -.LC4: - .ascii ")\n\000" - .align 2 -.LC5: - .ascii "i=\000" - .align 2 -.LC6: - .ascii "\n\000" - .align 2 -.LC7: - .ascii "test erasures: \000" - .align 2 -.LC8: - .ascii "errors \000" - .align 2 -.LC9: - .ascii "Warning: \000" - .align 2 -.LC10: - .ascii "errors and \000" - .align 2 -.LC11: - .ascii "erasures exceeds the correction ability of the code\n\000" - .align 2 -.LC12: - .ascii "Init_RS Done\000" - .align 2 -.LC13: - .ascii "\n" - .ascii " Trial \000" - .align 2 -.LC14: - .ascii " erasing:\000" - .align 2 -.LC15: - .ascii " erroring:\000" - .align 2 -.LC16: - .ascii "errs + erasures corrected: \000" - .align 2 -.LC17: - .ascii "RS decoder detected failure\n\000" - .align 2 -.LC18: - .ascii " Undetected decoding failure!\n\000" - .align 2 -.LC19: - .ascii "Compare Done. Passed.\n\000" - .align 2 -.LC20: - .ascii "\n\n\n" - .ascii " Total Trials: \000" - .align 2 -.LC21: - .ascii " decoding failures: \000" - .align 2 -.LC22: - .ascii " not detected by decoder: \000" - .align 2 -.LC23: - .ascii "$finish\000" - - .comm Alpha_to,1024 - - .comm Index_of,1024 - - .comm Gg,132 - - .comm data,255 - - .comm tdata,255 - - .comm ddata,255 - - .comm eras_pos,1020 - - .text - .text - .align 2 - .globl print_uart - .ent print_uart -print_uart: - .frame $sp,0,$ra # vars= 0, regs= 0/0, args= 0, extra= 0 - .mask 0x00000000,0 - .fmask 0x00000000,0 - lbu $v0,0($a0) - beq $v0,$zero,.L3 - li $v1,536870912 # 0x20000000 -.L5: - #.set volatile - lw $v0,0($v1) - #.set novolatile - andi $v0,$v0,0x0100 - bne $v0,$zero,.L5 - lbu $v0,0($a0) - #.set volatile - sb $v0,0($v1) - #.set novolatile - addu $a0,$a0,1 - lbu $v0,0($a0) - bne $v0,$zero,.L5 -.L3: - j $ra - .end print_uart - .size print_uart,.-print_uart - .align 2 - .globl putc_uart - .ent putc_uart -putc_uart: - .frame $sp,0,$ra # vars= 0, regs= 0/0, args= 0, extra= 0 - .mask 0x00000000,0 - .fmask 0x00000000,0 - andi $a0,$a0,0x00ff - li $v1,536870912 # 0x20000000 -.L11: - #.set volatile - lw $v0,0($v1) - #.set novolatile - andi $v0,$v0,0x0100 - .set noreorder - .set nomacro - bne $v0,$zero,.L11 - li $v0,536870912 # 0x20000000 - .set macro - .set reorder - - #.set volatile - sb $a0,0($v0) - #.set novolatile - j $ra - .end putc_uart - .size putc_uart,.-putc_uart - .align 2 - .globl read_uart - .ent read_uart -read_uart: - .frame $sp,0,$ra # vars= 0, regs= 0/0, args= 0, extra= 0 - .mask 0x00000000,0 - .fmask 0x00000000,0 - li $v0,536870912 # 0x20000000 - #.set volatile - lw $v0,0($v0) - #.set novolatile - .set noreorder - .set nomacro - j $ra - andi $v0,$v0,0x00ff - .set macro - .set reorder - - .end read_uart - .size read_uart,.-read_uart - .align 2 - .globl print - .ent print -print: - .frame $sp,0,$ra # vars= 0, regs= 0/0, args= 0, extra= 0 - .mask 0x00000000,0 - .fmask 0x00000000,0 - lbu $v0,0($a0) - .set noreorder - .set nomacro - beq $v0,$zero,.L18 - move $v1,$v0 - .set macro - .set reorder - - li $a1,536870912 # 0x20000000 - move $v0,$v1 -.L21: - #.set volatile - sb $v0,0($a1) - #.set novolatile - addu $a0,$a0,1 - lbu $v1,0($a0) - .set noreorder - .set nomacro - bne $v1,$zero,.L21 - move $v0,$v1 - .set macro - .set reorder - -.L18: - li $v0,536870912 # 0x20000000 - #.set volatile - sb $zero,0($v0) - #.set novolatile - j $ra - .end print - .size print,.-print - .align 2 - .globl print_char - .ent print_char -print_char: - .frame $sp,0,$ra # vars= 0, regs= 0/0, args= 0, extra= 0 - .mask 0x00000000,0 - .fmask 0x00000000,0 - andi $a0,$a0,0x00ff - li $v0,536870912 # 0x20000000 - #.set volatile - sb $a0,0($v0) - #.set novolatile - j $ra - .end print_char - .size print_char,.-print_char - .align 2 - .globl print_uchar - .ent print_uchar -print_uchar: - .frame $sp,0,$ra # vars= 0, regs= 0/0, args= 0, extra= 0 - .mask 0x00000000,0 - .fmask 0x00000000,0 - andi $a0,$a0,0x00ff - li $v0,536870912 # 0x20000000 - #.set volatile - sb $a0,0($v0) - #.set novolatile - j $ra - .end print_uchar - .size print_uchar,.-print_uchar - .text - .align 2 - .globl random - .ent random -random: - .frame $sp,0,$ra # vars= 0, regs= 0/0, args= 0, extra= 0 - .mask 0x00000000,0 - .fmask 0x00000000,0 - lw $v1,lfsr_state - andi $v0,$v1,0x0001 - .set noreorder - .set nomacro - beq $v0,$zero,.L25 - srl $v0,$v1,1 - .set macro - .set reorder - - li $v1,-2147483648 # 0x80000000 - ori $v1,$v1,0x0057 - .set noreorder - .set nomacro - b .L27 - xor $v0,$v0,$v1 - .set macro - .set reorder - -.L25: - lw $v0,lfsr_state - srl $v0,$v0,1 -.L27: - sw $v0,lfsr_state - lw $v0,lfsr_state - j $ra - .end random - .size random,.-random - .align 2 - .globl print_num - .ent print_num -print_num: - .frame $sp,40,$ra # vars= 0, regs= 5/0, args= 16, extra= 0 - .mask 0x800f0000,-8 - .fmask 0x00000000,0 - subu $sp,$sp,40 - sw $ra,32($sp) - sw $s3,28($sp) - sw $s2,24($sp) - sw $s1,20($sp) - sw $s0,16($sp) - move $s2,$a0 - li $s1,1000 # 0x000003e8 - li $s3,-858993459 # 0xcccccccd -.L32: - divu $s0,$s2,$s1 - addu $a0,$s0,48 - .set noreorder - .set nomacro - jal putc_uart - andi $a0,$a0,0x00ff - .set macro - .set reorder - - mult $s0,$s1 - mflo $v0 - subu $s2,$s2,$v0 - multu $s1,$s3 - mfhi $v0 - srl $s1,$v0,3 - bne $s1,$zero,.L32 - lw $ra,32($sp) - lw $s3,28($sp) - lw $s2,24($sp) - lw $s1,20($sp) - lw $s0,16($sp) - .set noreorder - .set nomacro - j $ra - addu $sp,$sp,40 - .set macro - .set reorder - - .end print_num - .size print_num,.-print_num - .align 2 - .globl memcpy - .ent memcpy -memcpy: - .frame $sp,0,$ra # vars= 0, regs= 0/0, args= 0, extra= 0 - .mask 0x00000000,0 - .fmask 0x00000000,0 - .set noreorder - .set nomacro - beq $a2,$zero,.L36 - move $v1,$zero - .set macro - .set reorder - -.L38: - lbu $v0,0($a1) - sb $v0,0($a0) - addu $a1,$a1,1 - addu $v1,$v1,1 - sltu $v0,$v1,$a2 - .set noreorder - .set nomacro - bne $v0,$zero,.L38 - addu $a0,$a0,1 - .set macro - .set reorder - -.L36: - j $ra - .end memcpy - .size memcpy,.-memcpy - .align 2 - .globl memcmp - .ent memcmp -memcmp: - .frame $sp,0,$ra # vars= 0, regs= 0/0, args= 0, extra= 0 - .mask 0x00000000,0 - .fmask 0x00000000,0 - .set noreorder - .set nomacro - beq $a2,$zero,.L42 - move $a3,$zero - .set macro - .set reorder - -.L44: - lbu $v1,0($a0) - lbu $v0,0($a1) - addu $a1,$a1,1 - .set noreorder - .set nomacro - beq $v1,$v0,.L43 - addu $a0,$a0,1 - .set macro - .set reorder - - .set noreorder - .set nomacro - b .L47 - li $v0,1 # 0x00000001 - .set macro - .set reorder - -.L43: - addu $a3,$a3,1 - sltu $v0,$a3,$a2 - bne $v0,$zero,.L44 -.L42: - move $v0,$zero -.L47: - j $ra - .end memcmp - .size memcmp,.-memcmp - .text - .align 2 - .ent modnn -modnn: - .frame $sp,0,$ra # vars= 0, regs= 0/0, args= 0, extra= 0 - .mask 0x00000000,0 - .fmask 0x00000000,0 - slt $v0,$a0,255 - bne $v0,$zero,.L50 - addu $a0,$a0,-255 -.L53: - sra $v0,$a0,8 - andi $v1,$a0,0x00ff - addu $a0,$v0,$v1 - slt $v0,$a0,255 - .set noreorder - .set nomacro - beq $v0,$zero,.L53 - addu $a0,$a0,-255 - .set macro - .set reorder - - addu $a0,$a0,255 -.L50: - .set noreorder - .set nomacro - j $ra - move $v0,$a0 - .set macro - .set reorder - - .end modnn - .size modnn,.-modnn - .align 2 - .globl init_rs - .ent init_rs -init_rs: - .frame $sp,24,$ra # vars= 0, regs= 1/0, args= 16, extra= 0 - .mask 0x80000000,-8 - .fmask 0x00000000,0 - subu $sp,$sp,24 - sw $ra,16($sp) - jal generate_gf - jal gen_poly - lw $ra,16($sp) - .set noreorder - .set nomacro - j $ra - addu $sp,$sp,24 - .set macro - .set reorder - - .end init_rs - .size init_rs,.-init_rs - .align 2 - .globl generate_gf - .ent generate_gf -generate_gf: - .frame $sp,0,$ra # vars= 0, regs= 0/0, args= 0, extra= 0 - .mask 0x00000000,0 - .fmask 0x00000000,0 - li $a2,1 # 0x00000001 - lui $v0,%hi(Alpha_to+32) # high - sw $zero,%lo(Alpha_to+32)($v0) - move $a1,$zero - lui $v0,%hi(Alpha_to) # high - addiu $a0,$v0,%lo(Alpha_to) # low - lui $v0,%hi(Index_of) # high - addiu $t0,$v0,%lo(Index_of) # low - lui $v0,%hi(Pp) # high - addiu $a3,$v0,%lo(Pp) # low -.L59: - sll $v1,$a1,2 - addu $v0,$v1,$a0 - sw $a2,0($v0) - sll $v0,$a2,2 - addu $v0,$v0,$t0 - sw $a1,0($v0) - addu $v1,$v1,$a3 - lw $v0,0($v1) - beq $v0,$zero,.L60 - lw $v0,32($a0) - xor $v0,$a2,$v0 - sw $v0,32($a0) -.L60: - addu $a1,$a1,1 - slt $v0,$a1,8 - .set noreorder - .set nomacro - bne $v0,$zero,.L59 - sll $a2,$a2,1 - .set macro - .set reorder - - lui $v1,%hi(Index_of) # high - addiu $v1,$v1,%lo(Index_of) # low - lui $v0,%hi(Alpha_to+32) # high - lw $v0,%lo(Alpha_to+32)($v0) - sll $v0,$v0,2 - addu $v0,$v0,$v1 - li $v1,8 # 0x00000008 - sw $v1,0($v0) - sra $a2,$a2,1 - li $a1,9 # 0x00000009 - lui $v0,%hi(Alpha_to) # high - addiu $a3,$v0,%lo(Alpha_to) # low - lui $v0,%hi(Index_of) # high - addiu $t0,$v0,%lo(Index_of) # low - addu $v0,$a1,-1 -.L70: - sll $v0,$v0,2 - addu $v0,$v0,$a3 - lw $v1,0($v0) - slt $v0,$v1,$a2 - .set noreorder - .set nomacro - bne $v0,$zero,.L66 - sll $v0,$a1,2 - .set macro - .set reorder - - addu $v0,$v0,$a3 - xor $v1,$a2,$v1 - sll $v1,$v1,1 - lw $a0,32($a3) - .set noreorder - .set nomacro - b .L69 - xor $v1,$v1,$a0 - .set macro - .set reorder - -.L66: - addu $v0,$v0,$a3 - addu $v1,$a1,-1 - sll $v1,$v1,2 - addu $v1,$v1,$a3 - lw $v1,0($v1) - sll $v1,$v1,1 -.L69: - sw $v1,0($v0) - sll $v0,$a1,2 - addu $v0,$v0,$a3 - lw $v0,0($v0) - sll $v0,$v0,2 - addu $v0,$v0,$t0 - sw $a1,0($v0) - addu $a1,$a1,1 - slt $v0,$a1,255 - .set noreorder - .set nomacro - bne $v0,$zero,.L70 - addu $v0,$a1,-1 - .set macro - .set reorder - - lui $v0,%hi(Index_of) # high - li $v1,255 # 0x000000ff - sw $v1,%lo(Index_of)($v0) - lui $v0,%hi(Alpha_to+1020) # high - .set noreorder - .set nomacro - j $ra - sw $zero,%lo(Alpha_to+1020)($v0) - .set macro - .set reorder - - .end generate_gf - .size generate_gf,.-generate_gf - .align 2 - .globl gen_poly - .ent gen_poly -gen_poly: - .frame $sp,56,$ra # vars= 0, regs= 9/0, args= 16, extra= 0 - .mask 0x80ff0000,-8 - .fmask 0x00000000,0 - subu $sp,$sp,56 - sw $ra,48($sp) - sw $s7,44($sp) - sw $s6,40($sp) - sw $s5,36($sp) - sw $s4,32($sp) - sw $s3,28($sp) - sw $s2,24($sp) - sw $s1,20($sp) - sw $s0,16($sp) - lui $v1,%hi(Gg) # high - addiu $a0,$v1,%lo(Gg) # low - lui $v0,%hi(Alpha_to+4) # high - lw $v0,%lo(Alpha_to+4)($v0) - sw $v0,%lo(Gg)($v1) - li $v0,1 # 0x00000001 - sw $v0,4($a0) - li $s2,2 # 0x00000002 - move $s7,$v1 - move $v0,$v1 - addiu $s3,$v0,%lo(Gg) # low - lui $v0,%hi(Index_of) # high - addiu $s6,$v0,%lo(Index_of) # low - lui $v0,%hi(Alpha_to) # high - addiu $s5,$v0,%lo(Alpha_to) # low - sll $v0,$s2,2 -.L90: - addu $v0,$v0,$s3 - li $v1,1 # 0x00000001 - addu $s0,$s2,-1 - .set noreorder - .set nomacro - blez $s0,.L77 - sw $v1,0($v0) - .set macro - .set reorder - - addu $s4,$s2,1 - sll $v0,$s0,2 -.L89: - addu $s1,$v0,$s3 - lw $v0,0($s1) - .set noreorder - .set nomacro - beq $v0,$zero,.L80 - sll $v0,$v0,2 - .set macro - .set reorder - - addu $v0,$v0,$s6 - lw $a0,0($v0) - addu $a0,$s4,$a0 - .set noreorder - .set nomacro - jal modnn - addu $a0,$a0,-1 - .set macro - .set reorder - - addu $v1,$s0,-1 - sll $v1,$v1,2 - addu $v1,$v1,$s3 - sll $v0,$v0,2 - addu $v0,$v0,$s5 - lw $v1,0($v1) - lw $v0,0($v0) - xor $v1,$v1,$v0 - .set noreorder - .set nomacro - b .L78 - sw $v1,0($s1) - .set macro - .set reorder - -.L80: - sll $v0,$s0,2 - addu $v0,$v0,$s3 - addu $v1,$s0,-1 - sll $v1,$v1,2 - addu $v1,$v1,$s3 - lw $v1,0($v1) - sw $v1,0($v0) -.L78: - addu $s0,$s0,-1 - .set noreorder - .set nomacro - bgtz $s0,.L89 - sll $v0,$s0,2 - .set macro - .set reorder - -.L77: - lw $v0,%lo(Gg)($s7) - sll $v0,$v0,2 - addu $v0,$v0,$s6 - lw $a0,0($v0) - addu $s0,$s2,1 - .set noreorder - .set nomacro - jal modnn - addu $a0,$s2,$a0 - .set macro - .set reorder - - sll $v0,$v0,2 - addu $v0,$v0,$s5 - lw $v0,0($v0) - sw $v0,%lo(Gg)($s7) - move $s2,$s0 - slt $v0,$s2,33 - .set noreorder - .set nomacro - bne $v0,$zero,.L90 - sll $v0,$s2,2 - .set macro - .set reorder - - move $s2,$zero - lui $v0,%hi(Gg) # high - addiu $a1,$v0,%lo(Gg) # low - lui $v0,%hi(Index_of) # high - addiu $a0,$v0,%lo(Index_of) # low -.L87: - sll $v1,$s2,2 - addu $v1,$v1,$a1 - lw $v0,0($v1) - sll $v0,$v0,2 - addu $v0,$v0,$a0 - lw $v0,0($v0) - sw $v0,0($v1) - addu $s2,$s2,1 - slt $v0,$s2,33 - bne $v0,$zero,.L87 - lw $ra,48($sp) - lw $s7,44($sp) - lw $s6,40($sp) - lw $s5,36($sp) - lw $s4,32($sp) - lw $s3,28($sp) - lw $s2,24($sp) - lw $s1,20($sp) - lw $s0,16($sp) - .set noreorder - .set nomacro - j $ra - addu $sp,$sp,56 - .set macro - .set reorder - - .end gen_poly - .size gen_poly,.-gen_poly - .align 2 - .globl encode_rs - .ent encode_rs -encode_rs: - .frame $sp,56,$ra # vars= 0, regs= 10/0, args= 16, extra= 0 - .mask 0xc0ff0000,-4 - .fmask 0x00000000,0 - subu $sp,$sp,56 - sw $ra,52($sp) - sw $fp,48($sp) - sw $s7,44($sp) - sw $s6,40($sp) - sw $s5,36($sp) - sw $s4,32($sp) - sw $s3,28($sp) - sw $s2,24($sp) - sw $s1,20($sp) - sw $s0,16($sp) - sw $a0,56($sp) - move $s2,$a1 - li $v1,31 # 0x0000001f -.L95: - addu $v0,$s2,$v1 - addu $v1,$v1,-1 - .set noreorder - .set nomacro - bgez $v1,.L95 - sb $zero,0($v0) - .set macro - .set reorder - - li $s3,222 # 0x000000de - lui $v0,%hi(Index_of) # high - addiu $fp,$v0,%lo(Index_of) # low - li $s5,255 # 0x000000ff - lui $s7,%hi(Gg) # high - move $v0,$s7 - addiu $s6,$v0,%lo(Gg) # low - lui $v0,%hi(Alpha_to) # high - addiu $s4,$v0,%lo(Alpha_to) # low -.L100: - lw $a2,56($sp) - addu $v0,$a2,$s3 - lbu $v0,0($v0) - lbu $v1,31($s2) - xor $v0,$v0,$v1 - sll $v0,$v0,2 - addu $v0,$v0,$fp - lw $s1,0($v0) - .set noreorder - .set nomacro - beq $s1,$s5,.L101 - li $s0,31 # 0x0000001f - .set macro - .set reorder - - sll $v0,$s0,2 -.L116: - addu $v0,$v0,$s6 - lw $v0,0($v0) - beq $v0,$s5,.L106 - .set noreorder - .set nomacro - jal modnn - addu $a0,$s1,$v0 - .set macro - .set reorder - - addu $a0,$s2,$s0 - sll $v0,$v0,2 - addu $v0,$v0,$s4 - lbu $v1,-1($a0) - lbu $v0,3($v0) - xor $v1,$v1,$v0 - .set noreorder - .set nomacro - b .L104 - sb $v1,0($a0) - .set macro - .set reorder - -.L106: - addu $v0,$s2,$s0 - lbu $v1,-1($v0) - sb $v1,0($v0) -.L104: - addu $s0,$s0,-1 - .set noreorder - .set nomacro - bgtz $s0,.L116 - sll $v0,$s0,2 - .set macro - .set reorder - - lw $a0,%lo(Gg)($s7) - .set noreorder - .set nomacro - jal modnn - addu $a0,$s1,$a0 - .set macro - .set reorder - - sll $v0,$v0,2 - addu $v0,$v0,$s4 - lbu $v0,3($v0) - .set noreorder - .set nomacro - b .L99 - sb $v0,0($s2) - .set macro - .set reorder - -.L101: -.L113: - addu $v0,$s2,$s0 - lbu $v1,-1($v0) - addu $s0,$s0,-1 - .set noreorder - .set nomacro - bgtz $s0,.L113 - sb $v1,0($v0) - .set macro - .set reorder - - sb $zero,0($s2) -.L99: - addu $s3,$s3,-1 - .set noreorder - .set nomacro - bgez $s3,.L100 - move $v0,$zero - .set macro - .set reorder - - lw $ra,52($sp) - lw $fp,48($sp) - lw $s7,44($sp) - lw $s6,40($sp) - lw $s5,36($sp) - lw $s4,32($sp) - lw $s3,28($sp) - lw $s2,24($sp) - lw $s1,20($sp) - lw $s0,16($sp) - .set noreorder - .set nomacro - j $ra - addu $sp,$sp,56 - .set macro - .set reorder - - .end encode_rs - .size encode_rs,.-encode_rs - .align 2 - .globl eras_dec_rs - .ent eras_dec_rs -eras_dec_rs: - .frame $sp,2176,$ra # vars= 2120, regs= 10/0, args= 16, extra= 0 - .mask 0xc0ff0000,-4 - .fmask 0x00000000,0 - subu $sp,$sp,2176 - sw $ra,2172($sp) - sw $fp,2168($sp) - sw $s7,2164($sp) - sw $s6,2160($sp) - sw $s5,2156($sp) - sw $s4,2152($sp) - sw $s3,2148($sp) - sw $s2,2144($sp) - sw $s1,2140($sp) - sw $s0,2136($sp) - sw $a0,2176($sp) - move $fp,$a1 - sw $a2,2184($sp) - li $s0,254 # 0x000000fe - addu $a0,$sp,16 - lui $v0,%hi(Index_of) # high - addiu $a1,$v0,%lo(Index_of) # low -.L121: - sll $v1,$s0,2 - addu $v1,$a0,$v1 - lw $a3,2176($sp) - addu $v0,$a3,$s0 - lbu $v0,0($v0) - sll $v0,$v0,2 - addu $v0,$v0,$a1 - lw $v0,0($v0) - addu $s0,$s0,-1 - .set noreorder - .set nomacro - bgez $s0,.L121 - sw $v0,0($v1) - .set macro - .set reorder - - move $s3,$zero - li $s0,1 # 0x00000001 - addu $s4,$sp,16 - li $s6,255 # 0x000000ff - lui $v0,%hi(Alpha_to) # high - addiu $s5,$v0,%lo(Alpha_to) # low -.L126: - move $s1,$zero - move $s2,$s1 - sll $v0,$s2,2 -.L264: - addu $v0,$s4,$v0 - lw $v0,0($v0) - beq $v0,$s6,.L129 - mult $s0,$s2 - mflo $a3 - .set noreorder - .set nomacro - jal modnn - addu $a0,$a3,$v0 - .set macro - .set reorder - - sll $v0,$v0,2 - addu $v0,$v0,$s5 - lw $v0,0($v0) - xor $s1,$s1,$v0 -.L129: - addu $s2,$s2,1 - slt $v0,$s2,255 - .set noreorder - .set nomacro - bne $v0,$zero,.L264 - sll $v0,$s2,2 - .set macro - .set reorder - - sll $v0,$s0,2 - addu $a0,$sp,$v0 - lui $v1,%hi(Index_of) # high - addiu $v1,$v1,%lo(Index_of) # low - sll $v0,$s1,2 - addu $v0,$v0,$v1 - lw $v0,0($v0) - sw $v0,1176($a0) - addu $s0,$s0,1 - slt $v0,$s0,33 - .set noreorder - .set nomacro - bne $v0,$zero,.L126 - or $s3,$s3,$s1 - .set macro - .set reorder - - .set noreorder - .set nomacro - bne $s3,$zero,.L134 - li $v1,31 # 0x0000001f - .set macro - .set reorder - - .set noreorder - .set nomacro - b .L258 - move $v0,$zero - .set macro - .set reorder - -.L134: - addu $a0,$sp,1044 -.L138: - sll $v0,$v1,2 - addu $v0,$a0,$v0 - addu $v1,$v1,-1 - .set noreorder - .set nomacro - bgez $v1,.L138 - sw $zero,0($v0) - .set macro - .set reorder - - li $v0,1 # 0x00000001 - sw $v0,1040($sp) - lw $a3,2184($sp) - .set noreorder - .set nomacro - blez $a3,.L140 - lui $v1,%hi(Alpha_to) # high - .set macro - .set reorder - - addiu $v1,$v1,%lo(Alpha_to) # low - lw $v0,0($fp) - sll $v0,$v0,2 - addu $v0,$v0,$v1 - lw $v0,0($v0) - sw $v0,1044($sp) - li $s0,1 # 0x00000001 - slt $v0,$s0,$a3 - .set noreorder - .set nomacro - beq $v0,$zero,.L140 - lui $v0,%hi(Index_of) # high - .set macro - .set reorder - - addiu $s7,$v0,%lo(Index_of) # low - addu $s3,$sp,1040 - li $s6,255 # 0x000000ff - sll $v0,$s0,2 -.L266: - addu $v0,$v0,$fp - lw $s4,0($v0) - addu $s2,$s0,1 - .set noreorder - .set nomacro - blez $s2,.L143 - lui $v0,%hi(Alpha_to) # high - .set macro - .set reorder - - addiu $s5,$v0,%lo(Alpha_to) # low - addu $v0,$s2,-1 -.L265: - sll $v0,$v0,2 - addu $v0,$s3,$v0 - lw $v0,0($v0) - sll $v0,$v0,2 - addu $v0,$v0,$s7 - lw $s1,0($v0) - beq $s1,$s6,.L147 - .set noreorder - .set nomacro - jal modnn - addu $a0,$s4,$s1 - .set macro - .set reorder - - sll $a0,$s2,2 - addu $a0,$s3,$a0 - sll $v0,$v0,2 - addu $v0,$v0,$s5 - lw $v1,0($a0) - lw $v0,0($v0) - xor $v1,$v1,$v0 - sw $v1,0($a0) -.L147: - addu $s2,$s2,-1 - .set noreorder - .set nomacro - bgtz $s2,.L265 - addu $v0,$s2,-1 - .set macro - .set reorder - -.L143: - addu $s0,$s0,1 - lw $a3,2184($sp) - slt $v0,$s0,$a3 - .set noreorder - .set nomacro - bne $v0,$zero,.L266 - sll $v0,$s0,2 - .set macro - .set reorder - -.L140: - move $s0,$zero - addu $a1,$sp,1312 - lui $v0,%hi(Index_of) # high - addiu $a2,$v0,%lo(Index_of) # low - addu $a0,$sp,1040 - sll $v0,$s0,2 -.L267: - addu $v1,$a1,$v0 - addu $v0,$a0,$v0 - lw $v0,0($v0) - sll $v0,$v0,2 - addu $v0,$v0,$a2 - lw $v0,0($v0) - sw $v0,0($v1) - addu $s0,$s0,1 - slt $v0,$s0,33 - .set noreorder - .set nomacro - bne $v0,$zero,.L267 - sll $v0,$s0,2 - .set macro - .set reorder - - lw $s3,2184($sp) - sw $s3,2112($sp) - addu $s3,$s3,1 - slt $v0,$s3,33 - .set noreorder - .set nomacro - beq $v0,$zero,.L158 - addu $a3,$sp,1176 - .set macro - .set reorder - - addu $s5,$sp,1040 - sw $a3,2124($sp) - li $s7,255 # 0x000000ff - lui $v0,%hi(Index_of) # high - addiu $fp,$v0,%lo(Index_of) # low - move $s1,$zero -.L271: - .set noreorder - .set nomacro - blez $s3,.L161 - move $s0,$s1 - .set macro - .set reorder - - lui $v0,%hi(Alpha_to) # high - addiu $s2,$v0,%lo(Alpha_to) # low - sll $v0,$s0,2 -.L268: - addu $v0,$s5,$v0 - lw $a0,0($v0) - .set noreorder - .set nomacro - beq $a0,$zero,.L162 - subu $v0,$s3,$s0 - .set macro - .set reorder - - sll $v0,$v0,2 - lw $a3,2124($sp) - addu $v0,$a3,$v0 - lw $v1,0($v0) - .set noreorder - .set nomacro - beq $v1,$s7,.L162 - sll $v0,$a0,2 - .set macro - .set reorder - - addu $v0,$v0,$fp - lw $a0,0($v0) - .set noreorder - .set nomacro - jal modnn - addu $a0,$a0,$v1 - .set macro - .set reorder - - sll $v0,$v0,2 - addu $v0,$v0,$s2 - lw $v0,0($v0) - xor $s1,$s1,$v0 -.L162: - addu $s0,$s0,1 - slt $v0,$s0,$s3 - .set noreorder - .set nomacro - bne $v0,$zero,.L268 - sll $v0,$s0,2 - .set macro - .set reorder - -.L161: - sll $v0,$s1,2 - addu $v0,$v0,$fp - lw $s1,0($v0) - .set noreorder - .set nomacro - bne $s1,$s7,.L166 - li $a0,31 # 0x0000001f - .set macro - .set reorder - - addu $a2,$sp,1316 - addu $a1,$sp,1312 -.L170: - sll $v0,$a0,2 - addu $v1,$a2,$v0 - addu $v0,$a1,$v0 - lw $v0,0($v0) - addu $a0,$a0,-1 - .set noreorder - .set nomacro - bgez $a0,.L170 - sw $v0,0($v1) - .set macro - .set reorder - - .set noreorder - .set nomacro - b .L157 - sw $s7,1312($sp) - .set macro - .set reorder - -.L166: - lw $v0,1040($sp) - sw $v0,1448($sp) - move $s0,$zero - addu $s4,$sp,1312 - addu $s2,$sp,1448 - lui $v0,%hi(Alpha_to) # high - addiu $s6,$v0,%lo(Alpha_to) # low - sll $v0,$s0,2 -.L269: - addu $v0,$s4,$v0 - lw $v0,0($v0) - beq $v0,$s7,.L177 - .set noreorder - .set nomacro - jal modnn - addu $a0,$s1,$v0 - .set macro - .set reorder - - addu $v1,$s0,1 - sll $v1,$v1,2 - addu $a0,$s2,$v1 - addu $v1,$s5,$v1 - sll $v0,$v0,2 - addu $v0,$v0,$s6 - lw $v1,0($v1) - lw $v0,0($v0) - xor $v1,$v1,$v0 - .set noreorder - .set nomacro - b .L175 - sw $v1,0($a0) - .set macro - .set reorder - -.L177: - addu $v0,$s0,1 - sll $v0,$v0,2 - addu $v1,$s2,$v0 - addu $v0,$s5,$v0 - lw $v0,0($v0) - sw $v0,0($v1) -.L175: - addu $s0,$s0,1 - slt $v0,$s0,32 - .set noreorder - .set nomacro - bne $v0,$zero,.L269 - sll $v0,$s0,2 - .set macro - .set reorder - - lw $a3,2112($sp) - sll $v1,$a3,1 - lw $a3,2184($sp) - addu $a0,$s3,$a3 - addu $v0,$a0,-1 - slt $v0,$v0,$v1 - .set noreorder - .set nomacro - bne $v0,$zero,.L180 - addu $a2,$sp,1316 - .set macro - .set reorder - - lw $a3,2112($sp) - subu $a3,$a0,$a3 - sw $a3,2112($sp) - move $s0,$zero - addu $s4,$sp,1312 - sll $v0,$s0,2 -.L270: - addu $s2,$s4,$v0 - addu $v0,$s5,$v0 - lw $v0,0($v0) - .set noreorder - .set nomacro - beq $v0,$zero,.L185 - sll $v0,$v0,2 - .set macro - .set reorder - - addu $v0,$v0,$fp - lw $a0,0($v0) - subu $a0,$a0,$s1 - .set noreorder - .set nomacro - jal modnn - addu $a0,$a0,255 - .set macro - .set reorder - - .set noreorder - .set nomacro - b .L262 - sw $v0,0($s2) - .set macro - .set reorder - -.L185: - li $v0,255 # 0x000000ff - sw $v0,0($s2) -.L262: - addu $s0,$s0,1 - slt $v0,$s0,33 - .set noreorder - .set nomacro - bne $v0,$zero,.L270 - sll $v0,$s0,2 - .set macro - .set reorder - - .set noreorder - .set nomacro - b .L263 - li $a0,32 # 0x00000020 - .set macro - .set reorder - -.L180: - li $a0,31 # 0x0000001f - addu $a1,$sp,1312 -.L192: - sll $v0,$a0,2 - addu $v1,$a2,$v0 - addu $v0,$a1,$v0 - lw $v0,0($v0) - addu $a0,$a0,-1 - .set noreorder - .set nomacro - bgez $a0,.L192 - sw $v0,0($v1) - .set macro - .set reorder - - sw $s7,1312($sp) - li $a0,32 # 0x00000020 -.L263: - addu $a1,$sp,1448 -.L197: - sll $v0,$a0,2 - addu $v1,$s5,$v0 - addu $v0,$a1,$v0 - lw $v0,0($v0) - addu $a0,$a0,-1 - .set noreorder - .set nomacro - bgez $a0,.L197 - sw $v0,0($v1) - .set macro - .set reorder - -.L157: - addu $s3,$s3,1 - slt $v0,$s3,33 - .set noreorder - .set nomacro - bne $v0,$zero,.L271 - move $s1,$zero - .set macro - .set reorder - -.L158: - move $fp,$zero - move $s0,$fp - addu $a0,$sp,1040 - lui $v0,%hi(Index_of) # high - addiu $a2,$v0,%lo(Index_of) # low - li $a1,255 # 0x000000ff - sll $v0,$s0,2 -.L272: - addu $v0,$a0,$v0 - lw $v1,0($v0) - sll $v1,$v1,2 - addu $v1,$v1,$a2 - lw $v1,0($v1) - .set noreorder - .set nomacro - beq $v1,$a1,.L202 - sw $v1,0($v0) - .set macro - .set reorder - - move $fp,$s0 -.L202: - addu $s0,$s0,1 - slt $v0,$s0,33 - .set noreorder - .set nomacro - bne $v0,$zero,.L272 - sll $v0,$s0,2 - .set macro - .set reorder - - li $a0,31 # 0x0000001f - addu $a2,$sp,1852 - addu $a1,$sp,1044 -.L209: - sll $v0,$a0,2 - addu $v1,$a2,$v0 - addu $v0,$a1,$v0 - lw $v0,0($v0) - addu $a0,$a0,-1 - .set noreorder - .set nomacro - bgez $a0,.L209 - sw $v0,0($v1) - .set macro - .set reorder - - sw $zero,2120($sp) - li $s0,1 # 0x00000001 - addu $s4,$sp,1848 - li $s5,255 # 0x000000ff - lui $v0,%hi(Alpha_to) # high - addiu $s6,$v0,%lo(Alpha_to) # low -.L214: - move $s2,$fp - .set noreorder - .set nomacro - blez $s2,.L216 - li $s3,1 # 0x00000001 - .set macro - .set reorder - - sll $v0,$s2,2 -.L273: - addu $s1,$s4,$v0 - lw $v0,0($s1) - beq $v0,$s5,.L217 - .set noreorder - .set nomacro - jal modnn - addu $a0,$s2,$v0 - .set macro - .set reorder - - sw $v0,0($s1) - sll $v0,$v0,2 - addu $v0,$v0,$s6 - lw $v0,0($v0) - xor $s3,$s3,$v0 -.L217: - addu $s2,$s2,-1 - .set noreorder - .set nomacro - bgtz $s2,.L273 - sll $v0,$s2,2 - .set macro - .set reorder - -.L216: - bne $s3,$zero,.L213 - lw $a3,2120($sp) - sll $v1,$a3,2 - addu $v0,$sp,$v1 - sw $s0,1720($v0) - move $v1,$v0 - subu $v0,$s5,$s0 - sw $v0,1984($v1) - addu $a3,$a3,1 - sw $a3,2120($sp) -.L213: - addu $s0,$s0,1 - slt $v0,$s0,256 - bne $v0,$zero,.L214 - lw $a3,2120($sp) - .set noreorder - .set nomacro - beq $fp,$a3,.L223 - move $s0,$zero - .set macro - .set reorder - - .set noreorder - .set nomacro - b .L258 - li $v0,-1 # 0xffffffff - .set macro - .set reorder - -.L223: - sw $zero,2116($sp) - addu $s4,$sp,1176 - li $s5,255 # 0x000000ff - addu $s3,$sp,1040 - lui $v0,%hi(Alpha_to) # high - addiu $s6,$v0,%lo(Alpha_to) # low -.L227: - move $s1,$zero - slt $v0,$fp,$s0 - .set noreorder - .set nomacro - beq $v0,$zero,.L228 - move $s2,$s0 - .set macro - .set reorder - - move $s2,$fp -.L228: - .set noreorder - .set nomacro - bltz $s2,.L259 - addu $v0,$s2,-1 - .set macro - .set reorder - -.L274: - subu $v0,$s0,$v0 - sll $v0,$v0,2 - addu $v0,$s4,$v0 - lw $a0,0($v0) - .set noreorder - .set nomacro - beq $a0,$s5,.L232 - sll $v0,$s2,2 - .set macro - .set reorder - - addu $v0,$s3,$v0 - lw $v0,0($v0) - beq $v0,$s5,.L232 - .set noreorder - .set nomacro - jal modnn - addu $a0,$a0,$v0 - .set macro - .set reorder - - sll $v0,$v0,2 - addu $v0,$v0,$s6 - lw $v0,0($v0) - xor $s1,$s1,$v0 -.L232: - addu $s2,$s2,-1 - .set noreorder - .set nomacro - bgez $s2,.L274 - addu $v0,$s2,-1 - .set macro - .set reorder - -.L259: - .set noreorder - .set nomacro - beq $s1,$zero,.L275 - sll $v0,$s0,2 - .set macro - .set reorder - - sw $s0,2116($sp) -.L275: - addu $a0,$sp,$v0 - lui $v1,%hi(Index_of) # high - addiu $v1,$v1,%lo(Index_of) # low - sll $v0,$s1,2 - addu $v0,$v0,$v1 - lw $v0,0($v0) - sw $v0,1584($a0) - addu $s0,$s0,1 - slt $v0,$s0,32 - .set noreorder - .set nomacro - bne $v0,$zero,.L227 - li $v0,255 # 0x000000ff - .set macro - .set reorder - - sw $v0,1712($sp) - lw $a3,2120($sp) - addu $s2,$a3,-1 - .set noreorder - .set nomacro - bltz $s2,.L239 - addu $a3,$sp,1584 - .set macro - .set reorder - - sw $a3,2128($sp) - addu $a3,$sp,1720 - sw $a3,2132($sp) - lui $v0,%hi(Alpha_to) # high - addiu $s7,$v0,%lo(Alpha_to) # low -.L241: - lw $s0,2116($sp) - .set noreorder - .set nomacro - bltz $s0,.L243 - move $s3,$zero - .set macro - .set reorder - - sll $v0,$s2,2 - lw $a3,2132($sp) - addu $s1,$a3,$v0 - sll $v0,$s0,2 -.L276: - lw $a3,2128($sp) - addu $v0,$a3,$v0 - lw $v1,0($v0) - li $a3,255 # 0x000000ff - beq $v1,$a3,.L244 - lw $v0,0($s1) - mult $s0,$v0 - mflo $a3 - .set noreorder - .set nomacro - jal modnn - addu $a0,$a3,$v1 - .set macro - .set reorder - - sll $v0,$v0,2 - addu $v0,$v0,$s7 - lw $v0,0($v0) - xor $s3,$s3,$v0 -.L244: - addu $s0,$s0,-1 - .set noreorder - .set nomacro - bgez $s0,.L276 - sll $v0,$s0,2 - .set macro - .set reorder - -.L243: - .set noreorder - .set nomacro - jal modnn - li $a0,255 # 0x000000ff - .set macro - .set reorder - - sll $v0,$v0,2 - addu $v0,$v0,$s7 - lw $s6,0($v0) - move $v1,$fp - slt $v0,$v1,32 - .set noreorder - .set nomacro - bne $v0,$zero,.L248 - move $s1,$zero - .set macro - .set reorder - - li $v1,31 # 0x0000001f -.L248: - li $v0,-2 # 0xfffffffe - and $s0,$v1,$v0 - .set noreorder - .set nomacro - bltz $s0,.L250 - sll $v0,$s2,2 - .set macro - .set reorder - - addu $s5,$sp,1040 - lw $a3,2132($sp) - addu $s4,$a3,$v0 - addu $v0,$s0,1 -.L277: - sll $v0,$v0,2 - addu $v0,$s5,$v0 - lw $v1,0($v0) - li $a3,255 # 0x000000ff - beq $v1,$a3,.L251 - lw $v0,0($s4) - mult $s0,$v0 - mflo $a3 - .set noreorder - .set nomacro - jal modnn - addu $a0,$a3,$v1 - .set macro - .set reorder - - sll $v0,$v0,2 - addu $v0,$v0,$s7 - lw $v0,0($v0) - xor $s1,$s1,$v0 -.L251: - addu $s0,$s0,-2 - .set noreorder - .set nomacro - bgez $s0,.L277 - addu $v0,$s0,1 - .set macro - .set reorder - -.L250: - .set noreorder - .set nomacro - beq $s1,$zero,.L258 - li $v0,-1 # 0xffffffff - .set macro - .set reorder - - .set noreorder - .set nomacro - beq $s3,$zero,.L240 - lui $a0,%hi(Index_of) # high - .set macro - .set reorder - - addiu $a0,$a0,%lo(Index_of) # low - sll $v1,$s3,2 - addu $v1,$v1,$a0 - sll $v0,$s6,2 - addu $v0,$v0,$a0 - lw $v1,0($v1) - lw $v0,0($v0) - addu $v1,$v1,$v0 - sll $v0,$s1,2 - addu $v0,$v0,$a0 - lw $a0,0($v0) - addu $a0,$a0,-255 - .set noreorder - .set nomacro - jal modnn - subu $a0,$v1,$a0 - .set macro - .set reorder - - sll $v1,$s2,2 - addu $v1,$sp,$v1 - lw $a0,1984($v1) - lw $a3,2176($sp) - addu $a0,$a3,$a0 - sll $v0,$v0,2 - addu $v0,$v0,$s7 - lbu $v1,0($a0) - lbu $v0,3($v0) - xor $v1,$v1,$v0 - sb $v1,0($a0) -.L240: - addu $s2,$s2,-1 - bgez $s2,.L241 -.L239: - lw $v0,2120($sp) -.L258: - lw $ra,2172($sp) - lw $fp,2168($sp) - lw $s7,2164($sp) - lw $s6,2160($sp) - lw $s5,2156($sp) - lw $s4,2152($sp) - lw $s3,2148($sp) - lw $s2,2144($sp) - lw $s1,2140($sp) - lw $s0,2136($sp) - .set noreorder - .set nomacro - j $ra - addu $sp,$sp,2176 - .set macro - .set reorder - - .end eras_dec_rs - .size eras_dec_rs,.-eras_dec_rs - .align 2 - .globl fill_eras - .ent fill_eras -fill_eras: - .frame $sp,1064,$ra # vars= 1024, regs= 5/0, args= 16, extra= 0 - .mask 0x800f0000,-8 - .fmask 0x00000000,0 - subu $sp,$sp,1064 - sw $ra,1056($sp) - sw $s3,1052($sp) - sw $s2,1048($sp) - sw $s1,1044($sp) - sw $s0,1040($sp) - move $s3,$a0 - move $s2,$a1 - move $a0,$zero - addu $v1,$sp,16 - sll $v0,$a0,2 -.L294: - addu $v0,$v1,$v0 - sw $a0,0($v0) - addu $a0,$a0,1 - slt $v0,$a0,255 - .set noreorder - .set nomacro - bne $v0,$zero,.L294 - sll $v0,$a0,2 - .set macro - .set reorder - - li $s0,254 # 0x000000fe - addu $s1,$sp,16 -.L287: - jal random - remu $a0,$v0,$s0 - sll $a0,$a0,2 - addu $a0,$s1,$a0 - lw $a1,0($a0) - sll $v1,$s0,2 - addu $v1,$s1,$v1 - lw $v0,0($v1) - sw $v0,0($a0) - addu $s0,$s0,-1 - .set noreorder - .set nomacro - bgtz $s0,.L287 - sw $a1,0($v1) - .set macro - .set reorder - - .set noreorder - .set nomacro - blez $s2,.L290 - move $a0,$zero - .set macro - .set reorder - - addu $a1,$sp,16 - sll $v0,$a0,2 -.L295: - addu $v1,$v0,$s3 - addu $v0,$a1,$v0 - lw $v0,0($v0) - sw $v0,0($v1) - addu $a0,$a0,1 - slt $v0,$a0,$s2 - .set noreorder - .set nomacro - bne $v0,$zero,.L295 - sll $v0,$a0,2 - .set macro - .set reorder - -.L290: - lw $ra,1056($sp) - lw $s3,1052($sp) - lw $s2,1048($sp) - lw $s1,1044($sp) - lw $s0,1040($sp) - .set noreorder - .set nomacro - j $ra - addu $sp,$sp,1064 - .set macro - .set reorder - - .end fill_eras - .size fill_eras,.-fill_eras - .align 2 - .globl randomnz - .ent randomnz -randomnz: - .frame $sp,24,$ra # vars= 0, regs= 1/0, args= 16, extra= 0 - .mask 0x80000000,-8 - .fmask 0x00000000,0 - subu $sp,$sp,24 - sw $ra,16($sp) -.L297: - jal random - andi $v0,$v0,0x00ff - beq $v0,$zero,.L297 - lw $ra,16($sp) - .set noreorder - .set nomacro - j $ra - addu $sp,$sp,24 - .set macro - .set reorder - - .end randomnz - .size randomnz,.-randomnz - .text - .align 2 - .globl main2 - .ent main2 -main2: - .frame $sp,72,$ra # vars= 16, regs= 10/0, args= 16, extra= 0 - .mask 0xc0ff0000,-4 - .fmask 0x00000000,0 - subu $sp,$sp,72 - sw $ra,68($sp) - sw $fp,64($sp) - sw $s7,60($sp) - sw $s6,56($sp) - sw $s5,52($sp) - sw $s4,48($sp) - sw $s3,44($sp) - sw $s2,40($sp) - sw $s1,36($sp) - sw $s0,32($sp) - li $s6,11 # 0x0000000b - li $s3,10 # 0x0000000a - lui $a0,%hi(.LC0) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC0) # low - .set macro - .set reorder - - lui $a0,%hi(.LC1) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC1) # low - .set macro - .set reorder - - .set noreorder - .set nomacro - jal print_num - li $a0,255 # 0x000000ff - .set macro - .set reorder - - lui $a0,%hi(.LC2) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC2) # low - .set macro - .set reorder - - .set noreorder - .set nomacro - jal print_num - li $a0,223 # 0x000000df - .set macro - .set reorder - - lui $a0,%hi(.LC3) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC3) # low - .set macro - .set reorder - - .set noreorder - .set nomacro - jal print_num - li $a0,256 # 0x00000100 - .set macro - .set reorder - - lui $a0,%hi(.LC4) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC4) # low - .set macro - .set reorder - - lui $a0,%hi(.LC5) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC5) # low - .set macro - .set reorder - - .set noreorder - .set nomacro - jal print_num - move $a0,$zero - .set macro - .set reorder - - lui $s0,%hi(.LC6) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$s0,%lo(.LC6) # low - .set macro - .set reorder - - lui $a0,%hi(.LC7) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC7) # low - .set macro - .set reorder - - .set noreorder - .set nomacro - jal print_num - move $a0,$s3 - .set macro - .set reorder - - lui $a0,%hi(.LC8) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC8) # low - .set macro - .set reorder - - .set noreorder - .set nomacro - jal print_num - move $a0,$s6 - .set macro - .set reorder - - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$s0,%lo(.LC6) # low - .set macro - .set reorder - - .set noreorder - .set nomacro - jal init_rs - move $s4,$zero - .set macro - .set reorder - - lui $a0,%hi(.LC12) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC12) # low - .set macro - .set reorder - - sw $zero,16($sp) - li $a3,120 # 0x00000078 - .set noreorder - .set nomacro - beq $a3,$zero,.L303 - sw $zero,20($sp) - .set macro - .set reorder - - move $s7,$s0 - lui $v0,%hi(data) # high - addiu $fp,$v0,%lo(data) # low - li $a3,1 # 0x00000001 - sltu $a3,$zero,$a3 - sw $a3,24($sp) - lui $v0,%hi(eras_pos) # high - addiu $s5,$v0,%lo(eras_pos) # low - li $a3,1 # 0x00000001 -.L340: - .set noreorder - .set nomacro - beq $a3,$zero,.L306 - lui $a0,%hi(.LC13) # high - .set macro - .set reorder - - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC13) # low - .set macro - .set reorder - - .set noreorder - .set nomacro - jal print_num - move $a0,$s4 - .set macro - .set reorder - -.L306: - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$s7,%lo(.LC6) # low - .set macro - .set reorder - - move $s0,$zero -.L310: - jal random - addu $v1,$s0,$fp - sb $v0,0($v1) - addu $s0,$s0,1 - slt $v0,$s0,223 - .set noreorder - .set nomacro - bne $v0,$zero,.L310 - move $a0,$fp - .set macro - .set reorder - - .set noreorder - .set nomacro - jal encode_rs - addu $a1,$fp,223 - .set macro - .set reorder - - lui $a3,%hi(eras_pos) # high - addiu $a0,$a3,%lo(eras_pos) # low - .set noreorder - .set nomacro - jal fill_eras - addu $a1,$s3,$s6 - .set macro - .set reorder - - sltu $v0,$zero,$s3 - lw $a3,24($sp) - and $v0,$a3,$v0 - .set noreorder - .set nomacro - beq $v0,$zero,.L337 - sltu $v0,$zero,$s6 - .set macro - .set reorder - - lui $a0,%hi(.LC14) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC14) # low - .set macro - .set reorder - - .set noreorder - .set nomacro - beq $s3,$zero,.L314 - move $s0,$zero - .set macro - .set reorder - - lui $a3,%hi(.LC2) # high -.L338: - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a3,%lo(.LC2) # low - .set macro - .set reorder - - sll $v0,$s0,2 - addu $v0,$v0,$s5 - lw $a0,0($v0) - .set noreorder - .set nomacro - jal print_num - addu $s0,$s0,1 - .set macro - .set reorder - - slt $v0,$s0,$s3 - .set noreorder - .set nomacro - bne $v0,$zero,.L338 - lui $a3,%hi(.LC2) # high - .set macro - .set reorder - -.L314: - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$s7,%lo(.LC6) # low - .set macro - .set reorder - - sltu $v0,$zero,$s6 - lw $a3,24($sp) -.L337: - and $v0,$a3,$v0 - .set noreorder - .set nomacro - beq $v0,$zero,.L318 - lui $a0,%hi(.LC15) # high - .set macro - .set reorder - - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC15) # low - .set macro - .set reorder - - move $s0,$s3 - addu $v0,$s0,$s6 - slt $v0,$s0,$v0 - .set noreorder - .set nomacro - beq $v0,$zero,.L320 - lui $a3,%hi(.LC2) # high - .set macro - .set reorder - - addu $s1,$s3,$s6 -.L339: - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a3,%lo(.LC2) # low - .set macro - .set reorder - - sll $v0,$s0,2 - addu $v0,$v0,$s5 - lw $a0,0($v0) - .set noreorder - .set nomacro - jal print_num - addu $s0,$s0,1 - .set macro - .set reorder - - slt $v0,$s0,$s1 - .set noreorder - .set nomacro - bne $v0,$zero,.L339 - lui $a3,%hi(.LC2) # high - .set macro - .set reorder - -.L320: - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$s7,%lo(.LC6) # low - .set macro - .set reorder - -.L318: - lui $a3,%hi(ddata) # high - addiu $a0,$a3,%lo(ddata) # low - lui $a3,%hi(data) # high - addiu $a1,$a3,%lo(data) # low - .set noreorder - .set nomacro - jal memcpy - li $a2,255 # 0x000000ff - .set macro - .set reorder - - addu $v0,$s3,$s6 - .set noreorder - .set nomacro - beq $v0,$zero,.L326 - move $s0,$zero - .set macro - .set reorder - - lui $v0,%hi(ddata) # high - addiu $s2,$v0,%lo(ddata) # low - addu $s1,$s3,$s6 -.L328: - jal randomnz - sll $v1,$s0,2 - addu $v1,$v1,$s5 - lw $a0,0($v1) - addu $a0,$a0,$s2 - lbu $v1,0($a0) - xor $v1,$v1,$v0 - addu $s0,$s0,1 - slt $v0,$s0,$s1 - .set noreorder - .set nomacro - bne $v0,$zero,.L328 - sb $v1,0($a0) - .set macro - .set reorder - -.L326: - lui $a3,%hi(ddata) # high - addiu $a0,$a3,%lo(ddata) # low - lui $a3,%hi(eras_pos) # high - addiu $a1,$a3,%lo(eras_pos) # low - .set noreorder - .set nomacro - jal eras_dec_rs - move $a2,$s3 - .set macro - .set reorder - - li $a3,1 # 0x00000001 - .set noreorder - .set nomacro - beq $a3,$zero,.L330 - move $s0,$v0 - .set macro - .set reorder - - lui $a0,%hi(.LC16) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC16) # low - .set macro - .set reorder - - .set noreorder - .set nomacro - jal print_num - move $a0,$s0 - .set macro - .set reorder - - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$s7,%lo(.LC6) # low - .set macro - .set reorder - -.L330: - li $v0,-1 # 0xffffffff - .set noreorder - .set nomacro - bne $s0,$v0,.L331 - lui $a3,%hi(ddata) # high - .set macro - .set reorder - - lw $a3,16($sp) - addu $a3,$a3,1 - sw $a3,16($sp) - lui $a0,%hi(.LC17) # high - .set noreorder - .set nomacro - b .L336 - addiu $a0,$a0,%lo(.LC17) # low - .set macro - .set reorder - -.L331: - addiu $a0,$a3,%lo(ddata) # low - lui $a3,%hi(data) # high - addiu $a1,$a3,%lo(data) # low - .set noreorder - .set nomacro - jal memcmp - li $a2,255 # 0x000000ff - .set macro - .set reorder - - .set noreorder - .set nomacro - beq $v0,$zero,.L333 - lui $a0,%hi(.LC18) # high - .set macro - .set reorder - - lw $a3,20($sp) - addu $a3,$a3,1 - sw $a3,20($sp) - .set noreorder - .set nomacro - b .L336 - addiu $a0,$a0,%lo(.LC18) # low - .set macro - .set reorder - -.L333: - lui $a0,%hi(.LC19) # high - addiu $a0,$a0,%lo(.LC19) # low -.L336: - .set noreorder - .set nomacro - jal print_uart - addu $s4,$s4,1 - .set macro - .set reorder - - slt $v0,$s4,120 - .set noreorder - .set nomacro - bne $v0,$zero,.L340 - li $a3,1 # 0x00000001 - .set macro - .set reorder - -.L303: - lui $a0,%hi(.LC20) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC20) # low - .set macro - .set reorder - - .set noreorder - .set nomacro - jal print_num - li $a0,120 # 0x00000078 - .set macro - .set reorder - - lui $a0,%hi(.LC21) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC21) # low - .set macro - .set reorder - - lw $a0,16($sp) - jal print_num - lui $a0,%hi(.LC22) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC22) # low - .set macro - .set reorder - - lw $a0,20($sp) - jal print_num - lui $a0,%hi(.LC6) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC6) # low - .set macro - .set reorder - - lui $a0,%hi(.LC23) # high - .set noreorder - .set nomacro - jal print_uart - addiu $a0,$a0,%lo(.LC23) # low - .set macro - .set reorder - - move $v0,$zero - lw $ra,68($sp) - lw $fp,64($sp) - lw $s7,60($sp) - lw $s6,56($sp) - lw $s5,52($sp) - lw $s4,48($sp) - lw $s3,44($sp) - lw $s2,40($sp) - lw $s1,36($sp) - lw $s0,32($sp) - .set noreorder - .set nomacro - j $ra - addu $sp,$sp,72 - .set macro - .set reorder - - .end main2 - .size main2,.-main2 Index: trunk/Soft/src/C/reed solomon/rs_tak_CHECK_UART_STATUS.lst =================================================================== --- trunk/Soft/src/C/reed solomon/rs_tak_CHECK_UART_STATUS.lst (revision 28) +++ trunk/Soft/src/C/reed solomon/rs_tak_CHECK_UART_STATUS.lst (nonexistent) @@ -1,1558 +0,0 @@ - -test.exe: file format elf32-bigmips - -Disassembly of section .text: - -00000000 : - 0: 3c1c0000 lui $gp,0x0 - 4: 379c0000 ori $gp,$gp,0x0 - 8: 3c040000 lui $a0,0x0 - c: 34840000 ori $a0,$a0,0x0 - 10: 3c050000 lui $a1,0x0 - 14: 34a50000 ori $a1,$a1,0x0 - 18: 3c1d0000 lui $sp,0x0 - 1c: 37bdfff0 ori $sp,$sp,0xfff0 - 20: ac800000 sw $zero,0($a0) - 24: 0085182a slt $v1,$a0,$a1 - 28: 1460fffd bnez $v1,20 - 2c: 24840004 addiu $a0,$a0,4 - 30: 0c000000 jal 0 - 34: 00000000 nop - 38: 0800000e j 38 - 3c: 341affff li $k0,0xffff - 40: 341b002e li $k1,0x2e - 44: a35b0000 sb $k1,0($k0) - 48: 341a0001 li $k0,0x1 - 4c: 401b7000 mfc0 $k1,$epc - 50: 03600008 jr $k1 - 54: 409a6000 mtc0 $k0,$status - -00000058 : - 58: 03e00008 jr $ra - 5c: 40846000 mtc0 $a0,$status - -00000060 : - 60: 3405ffff li $a1,0xffff - 64: 03e00008 jr $ra - 68: a0a40000 sb $a0,0($a1) - -0000006c : - 6c: 3405ffff li $a1,0xffff - 70: 80860000 lb $a2,0($a0) - 74: 10c00003 beqz $a2,84 - 78: 24840001 addiu $a0,$a0,1 - 7c: 1000fffc b 70 - 80: a0a60000 sb $a2,0($a1) - 84: 03e00008 jr $ra - 88: 34020000 li $v0,0x0 - -0000008c : - 8c: 90820000 lbu $v0,0($a0) - 90: 00000000 nop - 94: 1040000f beqz $v0,d4 - 98: 00000000 nop - 9c: 3c032000 lui $v1,0x2000 - a0: 8c620000 lw $v0,0($v1) - a4: 00000000 nop - a8: 30420100 andi $v0,$v0,0x100 - ac: 1440fffc bnez $v0,a0 - b0: 00000000 nop - b4: 90820000 lbu $v0,0($a0) - b8: 00000000 nop - bc: a0620000 sb $v0,0($v1) - c0: 24840001 addiu $a0,$a0,1 - c4: 90820000 lbu $v0,0($a0) - c8: 00000000 nop - cc: 1440fff4 bnez $v0,a0 - d0: 00000000 nop - d4: 03e00008 jr $ra - d8: 00000000 nop - -000000dc : - dc: 308400ff andi $a0,$a0,0xff - e0: 3c032000 lui $v1,0x2000 - e4: 8c620000 lw $v0,0($v1) - e8: 00000000 nop - ec: 30420100 andi $v0,$v0,0x100 - f0: 1440fffc bnez $v0,e4 - f4: 3c022000 lui $v0,0x2000 - f8: a0440000 sb $a0,0($v0) - fc: 03e00008 jr $ra - 100: 00000000 nop - -00000104 : - 104: 3c022000 lui $v0,0x2000 - 108: 8c420000 lw $v0,0($v0) - 10c: 03e00008 jr $ra - 110: 304200ff andi $v0,$v0,0xff - -00000114 : - 114: 90820000 lbu $v0,0($a0) - 118: 00000000 nop - 11c: 10400009 beqz $v0,144 - 120: 00401825 move $v1,$v0 - 124: 3c052000 lui $a1,0x2000 - 128: 00601025 move $v0,$v1 - 12c: a0a20000 sb $v0,0($a1) - 130: 24840001 addiu $a0,$a0,1 - 134: 90830000 lbu $v1,0($a0) - 138: 00000000 nop - 13c: 1460fffb bnez $v1,12c - 140: 00601025 move $v0,$v1 - 144: 3c022000 lui $v0,0x2000 - 148: 03e00008 jr $ra - 14c: a0400000 sb $zero,0($v0) - -00000150 : - 150: 308400ff andi $a0,$a0,0xff - 154: 3c022000 lui $v0,0x2000 - 158: 03e00008 jr $ra - 15c: a0440000 sb $a0,0($v0) - -00000160 : - 160: 308400ff andi $a0,$a0,0xff - 164: 3c022000 lui $v0,0x2000 - 168: 03e00008 jr $ra - 16c: a0440000 sb $a0,0($v0) - -00000170 : - 170: 8f838010 lw $v1,-32752($gp) - 174: 00000000 nop - 178: 30620001 andi $v0,$v1,0x1 - 17c: 10400005 beqz $v0,194 - 180: 00031042 srl $v0,$v1,0x1 - 184: 3c038000 lui $v1,0x8000 - 188: 34630057 ori $v1,$v1,0x57 - 18c: 10000004 b 1a0 - 190: 00431026 xor $v0,$v0,$v1 - 194: 8f828010 lw $v0,-32752($gp) - 198: 00000000 nop - 19c: 00021042 srl $v0,$v0,0x1 - 1a0: af828010 sw $v0,-32752($gp) - 1a4: 8f828010 lw $v0,-32752($gp) - 1a8: 03e00008 jr $ra - 1ac: 00000000 nop - -000001b0 : - 1b0: 27bdffd8 addiu $sp,$sp,-40 - 1b4: afbf0020 sw $ra,32($sp) - 1b8: afb3001c sw $s3,28($sp) - 1bc: afb20018 sw $s2,24($sp) - 1c0: afb10014 sw $s1,20($sp) - 1c4: afb00010 sw $s0,16($sp) - 1c8: 00809025 move $s2,$a0 - 1cc: 241103e8 li $s1,1000 - 1d0: 3c13cccc lui $s3,0xcccc - 1d4: 3673cccd ori $s3,$s3,0xcccd - 1d8: 16200002 bnez $s1,1e4 - 1dc: 0251001b divu $zero,$s2,$s1 - 1e0: 0007000d break 0x7 - 1e4: 00008012 mflo $s0 - 1e8: 26040030 addiu $a0,$s0,48 - 1ec: 0c000037 jal dc - 1f0: 308400ff andi $a0,$a0,0xff - 1f4: 02110018 mult $s0,$s1 - 1f8: 00001012 mflo $v0 - 1fc: 02429023 subu $s2,$s2,$v0 - 200: 00000000 nop - 204: 02330019 multu $s1,$s3 - 208: 00001010 mfhi $v0 - 20c: 000288c2 srl $s1,$v0,0x3 - 210: 1620fff1 bnez $s1,1d8 - 214: 00000000 nop - 218: 8fbf0020 lw $ra,32($sp) - 21c: 8fb3001c lw $s3,28($sp) - 220: 8fb20018 lw $s2,24($sp) - 224: 8fb10014 lw $s1,20($sp) - 228: 8fb00010 lw $s0,16($sp) - 22c: 03e00008 jr $ra - 230: 27bd0028 addiu $sp,$sp,40 - -00000234 : - 234: 10c00009 beqz $a2,25c - 238: 00001825 move $v1,$zero - 23c: 90a20000 lbu $v0,0($a1) - 240: 00000000 nop - 244: a0820000 sb $v0,0($a0) - 248: 24a50001 addiu $a1,$a1,1 - 24c: 24630001 addiu $v1,$v1,1 - 250: 0066102b sltu $v0,$v1,$a2 - 254: 1440fff9 bnez $v0,23c - 258: 24840001 addiu $a0,$a0,1 - 25c: 03e00008 jr $ra - 260: 00000000 nop - -00000264 : - 264: 10c0000c beqz $a2,298 - 268: 00003825 move $a3,$zero - 26c: 90830000 lbu $v1,0($a0) - 270: 90a20000 lbu $v0,0($a1) - 274: 24a50001 addiu $a1,$a1,1 - 278: 10620003 beq $v1,$v0,288 - 27c: 24840001 addiu $a0,$a0,1 - 280: 10000006 b 29c - 284: 24020001 li $v0,1 - 288: 24e70001 addiu $a3,$a3,1 - 28c: 00e6102b sltu $v0,$a3,$a2 - 290: 1440fff6 bnez $v0,26c - 294: 00000000 nop - 298: 00001025 move $v0,$zero - 29c: 03e00008 jr $ra - 2a0: 00000000 nop - 2a4: 288200ff slti $v0,$a0,255 - 2a8: 14400009 bnez $v0,2d0 - 2ac: 00000000 nop - 2b0: 2484ff01 addiu $a0,$a0,-255 - 2b4: 00041203 sra $v0,$a0,0x8 - 2b8: 308300ff andi $v1,$a0,0xff - 2bc: 00432021 addu $a0,$v0,$v1 - 2c0: 288200ff slti $v0,$a0,255 - 2c4: 1040fffb beqz $v0,2b4 - 2c8: 2484ff01 addiu $a0,$a0,-255 - 2cc: 248400ff addiu $a0,$a0,255 - 2d0: 03e00008 jr $ra - 2d4: 00801025 move $v0,$a0 - -000002d8 : - 2d8: 27bdffe8 addiu $sp,$sp,-24 - 2dc: afbf0010 sw $ra,16($sp) - 2e0: 0c0000c0 jal 300 - 2e4: 00000000 nop - 2e8: 0c000113 jal 44c - 2ec: 00000000 nop - 2f0: 8fbf0010 lw $ra,16($sp) - 2f4: 00000000 nop - 2f8: 03e00008 jr $ra - 2fc: 27bd0018 addiu $sp,$sp,24 - -00000300 : - 300: 24060001 li $a2,1 - 304: 3c020000 lui $v0,0x0 - 308: ac400020 sw $zero,32($v0) - 30c: 00002825 move $a1,$zero - 310: 3c020000 lui $v0,0x0 - 314: 24440000 addiu $a0,$v0,0 - 318: 3c020000 lui $v0,0x0 - 31c: 24480000 addiu $t0,$v0,0 - 320: 3c020000 lui $v0,0x0 - 324: 24470000 addiu $a3,$v0,0 - 328: 00051880 sll $v1,$a1,0x2 - 32c: 00641021 addu $v0,$v1,$a0 - 330: ac460000 sw $a2,0($v0) - 334: 00061080 sll $v0,$a2,0x2 - 338: 00481021 addu $v0,$v0,$t0 - 33c: ac450000 sw $a1,0($v0) - 340: 00671821 addu $v1,$v1,$a3 - 344: 8c620000 lw $v0,0($v1) - 348: 00000000 nop - 34c: 10400005 beqz $v0,364 - 350: 00000000 nop - 354: 8c820020 lw $v0,32($a0) - 358: 00000000 nop - 35c: 00c21026 xor $v0,$a2,$v0 - 360: ac820020 sw $v0,32($a0) - 364: 24a50001 addiu $a1,$a1,1 - 368: 28a20008 slti $v0,$a1,8 - 36c: 1440ffee bnez $v0,328 - 370: 00063040 sll $a2,$a2,0x1 - 374: 3c030000 lui $v1,0x0 - 378: 24630000 addiu $v1,$v1,0 - 37c: 3c020000 lui $v0,0x0 - 380: 8c420020 lw $v0,32($v0) - 384: 00000000 nop - 388: 00021080 sll $v0,$v0,0x2 - 38c: 00431021 addu $v0,$v0,$v1 - 390: 24030008 li $v1,8 - 394: ac430000 sw $v1,0($v0) - 398: 00063043 sra $a2,$a2,0x1 - 39c: 24050009 li $a1,9 - 3a0: 3c020000 lui $v0,0x0 - 3a4: 24470000 addiu $a3,$v0,0 - 3a8: 3c020000 lui $v0,0x0 - 3ac: 24480000 addiu $t0,$v0,0 - 3b0: 24a2ffff addiu $v0,$a1,-1 - 3b4: 00021080 sll $v0,$v0,0x2 - 3b8: 00471021 addu $v0,$v0,$a3 - 3bc: 8c430000 lw $v1,0($v0) - 3c0: 00000000 nop - 3c4: 0066102a slt $v0,$v1,$a2 - 3c8: 14400007 bnez $v0,3e8 - 3cc: 00051080 sll $v0,$a1,0x2 - 3d0: 00471021 addu $v0,$v0,$a3 - 3d4: 00c31826 xor $v1,$a2,$v1 - 3d8: 00031840 sll $v1,$v1,0x1 - 3dc: 8ce40020 lw $a0,32($a3) - 3e0: 10000008 b 404 - 3e4: 00641826 xor $v1,$v1,$a0 - 3e8: 00471021 addu $v0,$v0,$a3 - 3ec: 24a3ffff addiu $v1,$a1,-1 - 3f0: 00031880 sll $v1,$v1,0x2 - 3f4: 00671821 addu $v1,$v1,$a3 - 3f8: 8c630000 lw $v1,0($v1) - 3fc: 00000000 nop - 400: 00031840 sll $v1,$v1,0x1 - 404: ac430000 sw $v1,0($v0) - 408: 00051080 sll $v0,$a1,0x2 - 40c: 00471021 addu $v0,$v0,$a3 - 410: 8c420000 lw $v0,0($v0) - 414: 00000000 nop - 418: 00021080 sll $v0,$v0,0x2 - 41c: 00481021 addu $v0,$v0,$t0 - 420: ac450000 sw $a1,0($v0) - 424: 24a50001 addiu $a1,$a1,1 - 428: 28a200ff slti $v0,$a1,255 - 42c: 1440ffe1 bnez $v0,3b4 - 430: 24a2ffff addiu $v0,$a1,-1 - 434: 3c020000 lui $v0,0x0 - 438: 240300ff li $v1,255 - 43c: ac430000 sw $v1,0($v0) - 440: 3c020000 lui $v0,0x0 - 444: 03e00008 jr $ra - 448: ac4003fc sw $zero,1020($v0) - -0000044c : - 44c: 27bdffc8 addiu $sp,$sp,-56 - 450: afbf0030 sw $ra,48($sp) - 454: afb7002c sw $s7,44($sp) - 458: afb60028 sw $s6,40($sp) - 45c: afb50024 sw $s5,36($sp) - 460: afb40020 sw $s4,32($sp) - 464: afb3001c sw $s3,28($sp) - 468: afb20018 sw $s2,24($sp) - 46c: afb10014 sw $s1,20($sp) - 470: afb00010 sw $s0,16($sp) - 474: 3c030000 lui $v1,0x0 - 478: 24640000 addiu $a0,$v1,0 - 47c: 3c020000 lui $v0,0x0 - 480: 8c420004 lw $v0,4($v0) - 484: 00000000 nop - 488: ac620000 sw $v0,0($v1) - 48c: 24020001 li $v0,1 - 490: ac820004 sw $v0,4($a0) - 494: 24120002 li $s2,2 - 498: 0060b825 move $s7,$v1 - 49c: 00601025 move $v0,$v1 - 4a0: 24530000 addiu $s3,$v0,0 - 4a4: 3c020000 lui $v0,0x0 - 4a8: 24560000 addiu $s6,$v0,0 - 4ac: 3c020000 lui $v0,0x0 - 4b0: 24550000 addiu $s5,$v0,0 - 4b4: 00121080 sll $v0,$s2,0x2 - 4b8: 00531021 addu $v0,$v0,$s3 - 4bc: 24030001 li $v1,1 - 4c0: 2650ffff addiu $s0,$s2,-1 - 4c4: 1a000024 blez $s0,558 - 4c8: ac430000 sw $v1,0($v0) - 4cc: 26540001 addiu $s4,$s2,1 - 4d0: 00101080 sll $v0,$s0,0x2 - 4d4: 00538821 addu $s1,$v0,$s3 - 4d8: 8e220000 lw $v0,0($s1) - 4dc: 00000000 nop - 4e0: 10400012 beqz $v0,52c - 4e4: 00021080 sll $v0,$v0,0x2 - 4e8: 00561021 addu $v0,$v0,$s6 - 4ec: 8c440000 lw $a0,0($v0) - 4f0: 00000000 nop - 4f4: 02842021 addu $a0,$s4,$a0 - 4f8: 0c0000a9 jal 2a4 - 4fc: 2484ffff addiu $a0,$a0,-1 - 500: 2603ffff addiu $v1,$s0,-1 - 504: 00031880 sll $v1,$v1,0x2 - 508: 00731821 addu $v1,$v1,$s3 - 50c: 00021080 sll $v0,$v0,0x2 - 510: 00551021 addu $v0,$v0,$s5 - 514: 8c630000 lw $v1,0($v1) - 518: 8c420000 lw $v0,0($v0) - 51c: 00000000 nop - 520: 00621826 xor $v1,$v1,$v0 - 524: 10000009 b 54c - 528: ae230000 sw $v1,0($s1) - 52c: 00101080 sll $v0,$s0,0x2 - 530: 00531021 addu $v0,$v0,$s3 - 534: 2603ffff addiu $v1,$s0,-1 - 538: 00031880 sll $v1,$v1,0x2 - 53c: 00731821 addu $v1,$v1,$s3 - 540: 8c630000 lw $v1,0($v1) - 544: 00000000 nop - 548: ac430000 sw $v1,0($v0) - 54c: 2610ffff addiu $s0,$s0,-1 - 550: 1e00ffe0 bgtz $s0,4d4 - 554: 00101080 sll $v0,$s0,0x2 - 558: 8ee20000 lw $v0,0($s7) - 55c: 00000000 nop - 560: 00021080 sll $v0,$v0,0x2 - 564: 00561021 addu $v0,$v0,$s6 - 568: 8c440000 lw $a0,0($v0) - 56c: 26500001 addiu $s0,$s2,1 - 570: 0c0000a9 jal 2a4 - 574: 02442021 addu $a0,$s2,$a0 - 578: 00021080 sll $v0,$v0,0x2 - 57c: 00551021 addu $v0,$v0,$s5 - 580: 8c420000 lw $v0,0($v0) - 584: 00000000 nop - 588: aee20000 sw $v0,0($s7) - 58c: 02009025 move $s2,$s0 - 590: 2a420021 slti $v0,$s2,33 - 594: 1440ffc8 bnez $v0,4b8 - 598: 00121080 sll $v0,$s2,0x2 - 59c: 00009025 move $s2,$zero - 5a0: 3c020000 lui $v0,0x0 - 5a4: 24450000 addiu $a1,$v0,0 - 5a8: 3c020000 lui $v0,0x0 - 5ac: 24440000 addiu $a0,$v0,0 - 5b0: 00121880 sll $v1,$s2,0x2 - 5b4: 00651821 addu $v1,$v1,$a1 - 5b8: 8c620000 lw $v0,0($v1) - 5bc: 00000000 nop - 5c0: 00021080 sll $v0,$v0,0x2 - 5c4: 00441021 addu $v0,$v0,$a0 - 5c8: 8c420000 lw $v0,0($v0) - 5cc: 00000000 nop - 5d0: ac620000 sw $v0,0($v1) - 5d4: 26520001 addiu $s2,$s2,1 - 5d8: 2a420021 slti $v0,$s2,33 - 5dc: 1440fff4 bnez $v0,5b0 - 5e0: 00000000 nop - 5e4: 8fbf0030 lw $ra,48($sp) - 5e8: 8fb7002c lw $s7,44($sp) - 5ec: 8fb60028 lw $s6,40($sp) - 5f0: 8fb50024 lw $s5,36($sp) - 5f4: 8fb40020 lw $s4,32($sp) - 5f8: 8fb3001c lw $s3,28($sp) - 5fc: 8fb20018 lw $s2,24($sp) - 600: 8fb10014 lw $s1,20($sp) - 604: 8fb00010 lw $s0,16($sp) - 608: 03e00008 jr $ra - 60c: 27bd0038 addiu $sp,$sp,56 - -00000610 : - 610: 27bdffc8 addiu $sp,$sp,-56 - 614: afbf0034 sw $ra,52($sp) - 618: afbe0030 sw $s8,48($sp) - 61c: afb7002c sw $s7,44($sp) - 620: afb60028 sw $s6,40($sp) - 624: afb50024 sw $s5,36($sp) - 628: afb40020 sw $s4,32($sp) - 62c: afb3001c sw $s3,28($sp) - 630: afb20018 sw $s2,24($sp) - 634: afb10014 sw $s1,20($sp) - 638: afb00010 sw $s0,16($sp) - 63c: afa40038 sw $a0,56($sp) - 640: 00a09025 move $s2,$a1 - 644: 2403001f li $v1,31 - 648: 02431021 addu $v0,$s2,$v1 - 64c: 2463ffff addiu $v1,$v1,-1 - 650: 0461fffd bgez $v1,648 - 654: a0400000 sb $zero,0($v0) - 658: 241300de li $s3,222 - 65c: 3c020000 lui $v0,0x0 - 660: 245e0000 addiu $s8,$v0,0 - 664: 241500ff li $s5,255 - 668: 3c170000 lui $s7,0x0 - 66c: 02e01025 move $v0,$s7 - 670: 24560000 addiu $s6,$v0,0 - 674: 3c020000 lui $v0,0x0 - 678: 24540000 addiu $s4,$v0,0 - 67c: 8fa60038 lw $a2,56($sp) - 680: 00000000 nop - 684: 00d31021 addu $v0,$a2,$s3 - 688: 90420000 lbu $v0,0($v0) - 68c: 9243001f lbu $v1,31($s2) - 690: 00000000 nop - 694: 00431026 xor $v0,$v0,$v1 - 698: 00021080 sll $v0,$v0,0x2 - 69c: 005e1021 addu $v0,$v0,$s8 - 6a0: 8c510000 lw $s1,0($v0) - 6a4: 00000000 nop - 6a8: 12350021 beq $s1,$s5,730 - 6ac: 2410001f li $s0,31 - 6b0: 00101080 sll $v0,$s0,0x2 - 6b4: 00561021 addu $v0,$v0,$s6 - 6b8: 8c420000 lw $v0,0($v0) - 6bc: 00000000 nop - 6c0: 1055000c beq $v0,$s5,6f4 - 6c4: 00000000 nop - 6c8: 0c0000a9 jal 2a4 - 6cc: 02222021 addu $a0,$s1,$v0 - 6d0: 02502021 addu $a0,$s2,$s0 - 6d4: 00021080 sll $v0,$v0,0x2 - 6d8: 00541021 addu $v0,$v0,$s4 - 6dc: 9083ffff lbu $v1,-1($a0) - 6e0: 90420003 lbu $v0,3($v0) - 6e4: 00000000 nop - 6e8: 00621826 xor $v1,$v1,$v0 - 6ec: 10000005 b 704 - 6f0: a0830000 sb $v1,0($a0) - 6f4: 02501021 addu $v0,$s2,$s0 - 6f8: 9043ffff lbu $v1,-1($v0) - 6fc: 00000000 nop - 700: a0430000 sb $v1,0($v0) - 704: 2610ffff addiu $s0,$s0,-1 - 708: 1e00ffea bgtz $s0,6b4 - 70c: 00101080 sll $v0,$s0,0x2 - 710: 8ee40000 lw $a0,0($s7) - 714: 0c0000a9 jal 2a4 - 718: 02242021 addu $a0,$s1,$a0 - 71c: 00021080 sll $v0,$v0,0x2 - 720: 00541021 addu $v0,$v0,$s4 - 724: 90420003 lbu $v0,3($v0) - 728: 10000007 b 748 - 72c: a2420000 sb $v0,0($s2) - 730: 02501021 addu $v0,$s2,$s0 - 734: 9043ffff lbu $v1,-1($v0) - 738: 2610ffff addiu $s0,$s0,-1 - 73c: 1e00fffc bgtz $s0,730 - 740: a0430000 sb $v1,0($v0) - 744: a2400000 sb $zero,0($s2) - 748: 2673ffff addiu $s3,$s3,-1 - 74c: 0661ffcb bgez $s3,67c - 750: 00001025 move $v0,$zero - 754: 8fbf0034 lw $ra,52($sp) - 758: 8fbe0030 lw $s8,48($sp) - 75c: 8fb7002c lw $s7,44($sp) - 760: 8fb60028 lw $s6,40($sp) - 764: 8fb50024 lw $s5,36($sp) - 768: 8fb40020 lw $s4,32($sp) - 76c: 8fb3001c lw $s3,28($sp) - 770: 8fb20018 lw $s2,24($sp) - 774: 8fb10014 lw $s1,20($sp) - 778: 8fb00010 lw $s0,16($sp) - 77c: 03e00008 jr $ra - 780: 27bd0038 addiu $sp,$sp,56 - -00000784 : - 784: 27bdf780 addiu $sp,$sp,-2176 - 788: afbf087c sw $ra,2172($sp) - 78c: afbe0878 sw $s8,2168($sp) - 790: afb70874 sw $s7,2164($sp) - 794: afb60870 sw $s6,2160($sp) - 798: afb5086c sw $s5,2156($sp) - 79c: afb40868 sw $s4,2152($sp) - 7a0: afb30864 sw $s3,2148($sp) - 7a4: afb20860 sw $s2,2144($sp) - 7a8: afb1085c sw $s1,2140($sp) - 7ac: afb00858 sw $s0,2136($sp) - 7b0: afa40880 sw $a0,2176($sp) - 7b4: 00a0f025 move $s8,$a1 - 7b8: afa60888 sw $a2,2184($sp) - 7bc: 241000fe li $s0,254 - 7c0: 27a40010 addiu $a0,$sp,16 - 7c4: 3c020000 lui $v0,0x0 - 7c8: 24450000 addiu $a1,$v0,0 - 7cc: 00101880 sll $v1,$s0,0x2 - 7d0: 00831821 addu $v1,$a0,$v1 - 7d4: 8fa70880 lw $a3,2176($sp) - 7d8: 00000000 nop - 7dc: 00f01021 addu $v0,$a3,$s0 - 7e0: 90420000 lbu $v0,0($v0) - 7e4: 00000000 nop - 7e8: 00021080 sll $v0,$v0,0x2 - 7ec: 00451021 addu $v0,$v0,$a1 - 7f0: 8c420000 lw $v0,0($v0) - 7f4: 2610ffff addiu $s0,$s0,-1 - 7f8: 0601fff4 bgez $s0,7cc - 7fc: ac620000 sw $v0,0($v1) - 800: 00009825 move $s3,$zero - 804: 24100001 li $s0,1 - 808: 27b40010 addiu $s4,$sp,16 - 80c: 241600ff li $s6,255 - 810: 3c020000 lui $v0,0x0 - 814: 24550000 addiu $s5,$v0,0 - 818: 00008825 move $s1,$zero - 81c: 02209025 move $s2,$s1 - 820: 00121080 sll $v0,$s2,0x2 - 824: 02821021 addu $v0,$s4,$v0 - 828: 8c420000 lw $v0,0($v0) - 82c: 00000000 nop - 830: 1056000a beq $v0,$s6,85c - 834: 00000000 nop - 838: 02120018 mult $s0,$s2 - 83c: 00003812 mflo $a3 - 840: 0c0000a9 jal 2a4 - 844: 00e22021 addu $a0,$a3,$v0 - 848: 00021080 sll $v0,$v0,0x2 - 84c: 00551021 addu $v0,$v0,$s5 - 850: 8c420000 lw $v0,0($v0) - 854: 00000000 nop - 858: 02228826 xor $s1,$s1,$v0 - 85c: 26520001 addiu $s2,$s2,1 - 860: 2a4200ff slti $v0,$s2,255 - 864: 1440ffef bnez $v0,824 - 868: 00121080 sll $v0,$s2,0x2 - 86c: 00101080 sll $v0,$s0,0x2 - 870: 03a22021 addu $a0,$sp,$v0 - 874: 3c030000 lui $v1,0x0 - 878: 24630000 addiu $v1,$v1,0 - 87c: 00111080 sll $v0,$s1,0x2 - 880: 00431021 addu $v0,$v0,$v1 - 884: 8c420000 lw $v0,0($v0) - 888: 00000000 nop - 88c: ac820498 sw $v0,1176($a0) - 890: 26100001 addiu $s0,$s0,1 - 894: 2a020021 slti $v0,$s0,33 - 898: 1440ffdf bnez $v0,818 - 89c: 02719825 or $s3,$s3,$s1 - 8a0: 16600003 bnez $s3,8b0 - 8a4: 2403001f li $v1,31 - 8a8: 100001ee b 1064 - 8ac: 00001025 move $v0,$zero - 8b0: 27a40414 addiu $a0,$sp,1044 - 8b4: 00031080 sll $v0,$v1,0x2 - 8b8: 00821021 addu $v0,$a0,$v0 - 8bc: 2463ffff addiu $v1,$v1,-1 - 8c0: 0461fffc bgez $v1,8b4 - 8c4: ac400000 sw $zero,0($v0) - 8c8: 24020001 li $v0,1 - 8cc: afa20410 sw $v0,1040($sp) - 8d0: 8fa70888 lw $a3,2184($sp) - 8d4: 00000000 nop - 8d8: 18e00036 blez $a3,9b4 - 8dc: 3c030000 lui $v1,0x0 - 8e0: 24630000 addiu $v1,$v1,0 - 8e4: 8fc20000 lw $v0,0($s8) - 8e8: 00000000 nop - 8ec: 00021080 sll $v0,$v0,0x2 - 8f0: 00431021 addu $v0,$v0,$v1 - 8f4: 8c420000 lw $v0,0($v0) - 8f8: 00000000 nop - 8fc: afa20414 sw $v0,1044($sp) - 900: 24100001 li $s0,1 - 904: 0207102a slt $v0,$s0,$a3 - 908: 1040002a beqz $v0,9b4 - 90c: 3c020000 lui $v0,0x0 - 910: 24570000 addiu $s7,$v0,0 - 914: 27b30410 addiu $s3,$sp,1040 - 918: 241600ff li $s6,255 - 91c: 00101080 sll $v0,$s0,0x2 - 920: 005e1021 addu $v0,$v0,$s8 - 924: 8c540000 lw $s4,0($v0) - 928: 26120001 addiu $s2,$s0,1 - 92c: 1a40001b blez $s2,99c - 930: 3c020000 lui $v0,0x0 - 934: 24550000 addiu $s5,$v0,0 - 938: 2642ffff addiu $v0,$s2,-1 - 93c: 00021080 sll $v0,$v0,0x2 - 940: 02621021 addu $v0,$s3,$v0 - 944: 8c420000 lw $v0,0($v0) - 948: 00000000 nop - 94c: 00021080 sll $v0,$v0,0x2 - 950: 00571021 addu $v0,$v0,$s7 - 954: 8c510000 lw $s1,0($v0) - 958: 00000000 nop - 95c: 1236000c beq $s1,$s6,990 - 960: 00000000 nop - 964: 0c0000a9 jal 2a4 - 968: 02912021 addu $a0,$s4,$s1 - 96c: 00122080 sll $a0,$s2,0x2 - 970: 02642021 addu $a0,$s3,$a0 - 974: 00021080 sll $v0,$v0,0x2 - 978: 00551021 addu $v0,$v0,$s5 - 97c: 8c830000 lw $v1,0($a0) - 980: 8c420000 lw $v0,0($v0) - 984: 00000000 nop - 988: 00621826 xor $v1,$v1,$v0 - 98c: ac830000 sw $v1,0($a0) - 990: 2652ffff addiu $s2,$s2,-1 - 994: 1e40ffe9 bgtz $s2,93c - 998: 2642ffff addiu $v0,$s2,-1 - 99c: 26100001 addiu $s0,$s0,1 - 9a0: 8fa70888 lw $a3,2184($sp) - 9a4: 00000000 nop - 9a8: 0207102a slt $v0,$s0,$a3 - 9ac: 1440ffdc bnez $v0,920 - 9b0: 00101080 sll $v0,$s0,0x2 - 9b4: 00008025 move $s0,$zero - 9b8: 27a50520 addiu $a1,$sp,1312 - 9bc: 3c020000 lui $v0,0x0 - 9c0: 24460000 addiu $a2,$v0,0 - 9c4: 27a40410 addiu $a0,$sp,1040 - 9c8: 00101080 sll $v0,$s0,0x2 - 9cc: 00a21821 addu $v1,$a1,$v0 - 9d0: 00821021 addu $v0,$a0,$v0 - 9d4: 8c420000 lw $v0,0($v0) - 9d8: 00000000 nop - 9dc: 00021080 sll $v0,$v0,0x2 - 9e0: 00461021 addu $v0,$v0,$a2 - 9e4: 8c420000 lw $v0,0($v0) - 9e8: 00000000 nop - 9ec: ac620000 sw $v0,0($v1) - 9f0: 26100001 addiu $s0,$s0,1 - 9f4: 2a020021 slti $v0,$s0,33 - 9f8: 1440fff4 bnez $v0,9cc - 9fc: 00101080 sll $v0,$s0,0x2 - a00: 8fb30888 lw $s3,2184($sp) - a04: 00000000 nop - a08: afb30840 sw $s3,2112($sp) - a0c: 26730001 addiu $s3,$s3,1 - a10: 2a620021 slti $v0,$s3,33 - a14: 1040009c beqz $v0,c88 - a18: 27a70498 addiu $a3,$sp,1176 - a1c: 27b50410 addiu $s5,$sp,1040 - a20: afa7084c sw $a3,2124($sp) - a24: 241700ff li $s7,255 - a28: 3c020000 lui $v0,0x0 - a2c: 245e0000 addiu $s8,$v0,0 - a30: 00008825 move $s1,$zero - a34: 1a60001e blez $s3,ab0 - a38: 02208025 move $s0,$s1 - a3c: 3c020000 lui $v0,0x0 - a40: 24520000 addiu $s2,$v0,0 - a44: 00101080 sll $v0,$s0,0x2 - a48: 02a21021 addu $v0,$s5,$v0 - a4c: 8c440000 lw $a0,0($v0) - a50: 00000000 nop - a54: 10800012 beqz $a0,aa0 - a58: 02701023 subu $v0,$s3,$s0 - a5c: 00021080 sll $v0,$v0,0x2 - a60: 8fa7084c lw $a3,2124($sp) - a64: 00000000 nop - a68: 00e21021 addu $v0,$a3,$v0 - a6c: 8c430000 lw $v1,0($v0) - a70: 00000000 nop - a74: 1077000a beq $v1,$s7,aa0 - a78: 00041080 sll $v0,$a0,0x2 - a7c: 005e1021 addu $v0,$v0,$s8 - a80: 8c440000 lw $a0,0($v0) - a84: 0c0000a9 jal 2a4 - a88: 00832021 addu $a0,$a0,$v1 - a8c: 00021080 sll $v0,$v0,0x2 - a90: 00521021 addu $v0,$v0,$s2 - a94: 8c420000 lw $v0,0($v0) - a98: 00000000 nop - a9c: 02228826 xor $s1,$s1,$v0 - aa0: 26100001 addiu $s0,$s0,1 - aa4: 0213102a slt $v0,$s0,$s3 - aa8: 1440ffe7 bnez $v0,a48 - aac: 00101080 sll $v0,$s0,0x2 - ab0: 00111080 sll $v0,$s1,0x2 - ab4: 005e1021 addu $v0,$v0,$s8 - ab8: 8c510000 lw $s1,0($v0) - abc: 00000000 nop - ac0: 1637000c bne $s1,$s7,af4 - ac4: 2404001f li $a0,31 - ac8: 27a60524 addiu $a2,$sp,1316 - acc: 27a50520 addiu $a1,$sp,1312 - ad0: 00041080 sll $v0,$a0,0x2 - ad4: 00c21821 addu $v1,$a2,$v0 - ad8: 00a21021 addu $v0,$a1,$v0 - adc: 8c420000 lw $v0,0($v0) - ae0: 2484ffff addiu $a0,$a0,-1 - ae4: 0481fffa bgez $a0,ad0 - ae8: ac620000 sw $v0,0($v1) - aec: 10000062 b c78 - af0: afb70520 sw $s7,1312($sp) - af4: 8fa20410 lw $v0,1040($sp) - af8: 00000000 nop - afc: afa205a8 sw $v0,1448($sp) - b00: 00008025 move $s0,$zero - b04: 27b40520 addiu $s4,$sp,1312 - b08: 27b205a8 addiu $s2,$sp,1448 - b0c: 3c020000 lui $v0,0x0 - b10: 24560000 addiu $s6,$v0,0 - b14: 00101080 sll $v0,$s0,0x2 - b18: 02821021 addu $v0,$s4,$v0 - b1c: 8c420000 lw $v0,0($v0) - b20: 00000000 nop - b24: 1057000f beq $v0,$s7,b64 - b28: 00000000 nop - b2c: 0c0000a9 jal 2a4 - b30: 02222021 addu $a0,$s1,$v0 - b34: 26030001 addiu $v1,$s0,1 - b38: 00031880 sll $v1,$v1,0x2 - b3c: 02432021 addu $a0,$s2,$v1 - b40: 02a31821 addu $v1,$s5,$v1 - b44: 00021080 sll $v0,$v0,0x2 - b48: 00561021 addu $v0,$v0,$s6 - b4c: 8c630000 lw $v1,0($v1) - b50: 8c420000 lw $v0,0($v0) - b54: 00000000 nop - b58: 00621826 xor $v1,$v1,$v0 - b5c: 10000008 b b80 - b60: ac830000 sw $v1,0($a0) - b64: 26020001 addiu $v0,$s0,1 - b68: 00021080 sll $v0,$v0,0x2 - b6c: 02421821 addu $v1,$s2,$v0 - b70: 02a21021 addu $v0,$s5,$v0 - b74: 8c420000 lw $v0,0($v0) - b78: 00000000 nop - b7c: ac620000 sw $v0,0($v1) - b80: 26100001 addiu $s0,$s0,1 - b84: 2a020020 slti $v0,$s0,32 - b88: 1440ffe3 bnez $v0,b18 - b8c: 00101080 sll $v0,$s0,0x2 - b90: 8fa70840 lw $a3,2112($sp) - b94: 00000000 nop - b98: 00071840 sll $v1,$a3,0x1 - b9c: 8fa70888 lw $a3,2184($sp) - ba0: 00000000 nop - ba4: 02672021 addu $a0,$s3,$a3 - ba8: 2482ffff addiu $v0,$a0,-1 - bac: 0043102a slt $v0,$v0,$v1 - bb0: 1440001e bnez $v0,c2c - bb4: 27a60524 addiu $a2,$sp,1316 - bb8: 8fa70840 lw $a3,2112($sp) - bbc: 00000000 nop - bc0: 00873823 subu $a3,$a0,$a3 - bc4: afa70840 sw $a3,2112($sp) - bc8: 00008025 move $s0,$zero - bcc: 27b40520 addiu $s4,$sp,1312 - bd0: 00101080 sll $v0,$s0,0x2 - bd4: 02829021 addu $s2,$s4,$v0 - bd8: 02a21021 addu $v0,$s5,$v0 - bdc: 8c420000 lw $v0,0($v0) - be0: 00000000 nop - be4: 10400009 beqz $v0,c0c - be8: 00021080 sll $v0,$v0,0x2 - bec: 005e1021 addu $v0,$v0,$s8 - bf0: 8c440000 lw $a0,0($v0) - bf4: 00000000 nop - bf8: 00912023 subu $a0,$a0,$s1 - bfc: 0c0000a9 jal 2a4 - c00: 248400ff addiu $a0,$a0,255 - c04: 10000003 b c14 - c08: ae420000 sw $v0,0($s2) - c0c: 240200ff li $v0,255 - c10: ae420000 sw $v0,0($s2) - c14: 26100001 addiu $s0,$s0,1 - c18: 2a020021 slti $v0,$s0,33 - c1c: 1440ffed bnez $v0,bd4 - c20: 00101080 sll $v0,$s0,0x2 - c24: 1000000c b c58 - c28: 24040020 li $a0,32 - c2c: 2404001f li $a0,31 - c30: 27a50520 addiu $a1,$sp,1312 - c34: 00041080 sll $v0,$a0,0x2 - c38: 00c21821 addu $v1,$a2,$v0 - c3c: 00a21021 addu $v0,$a1,$v0 - c40: 8c420000 lw $v0,0($v0) - c44: 2484ffff addiu $a0,$a0,-1 - c48: 0481fffa bgez $a0,c34 - c4c: ac620000 sw $v0,0($v1) - c50: afb70520 sw $s7,1312($sp) - c54: 24040020 li $a0,32 - c58: 27a505a8 addiu $a1,$sp,1448 - c5c: 00041080 sll $v0,$a0,0x2 - c60: 02a21821 addu $v1,$s5,$v0 - c64: 00a21021 addu $v0,$a1,$v0 - c68: 8c420000 lw $v0,0($v0) - c6c: 2484ffff addiu $a0,$a0,-1 - c70: 0481fffa bgez $a0,c5c - c74: ac620000 sw $v0,0($v1) - c78: 26730001 addiu $s3,$s3,1 - c7c: 2a620021 slti $v0,$s3,33 - c80: 1440ff6c bnez $v0,a34 - c84: 00008825 move $s1,$zero - c88: 0000f025 move $s8,$zero - c8c: 03c08025 move $s0,$s8 - c90: 27a40410 addiu $a0,$sp,1040 - c94: 3c020000 lui $v0,0x0 - c98: 24460000 addiu $a2,$v0,0 - c9c: 240500ff li $a1,255 - ca0: 00101080 sll $v0,$s0,0x2 - ca4: 00821021 addu $v0,$a0,$v0 - ca8: 8c430000 lw $v1,0($v0) - cac: 00000000 nop - cb0: 00031880 sll $v1,$v1,0x2 - cb4: 00661821 addu $v1,$v1,$a2 - cb8: 8c630000 lw $v1,0($v1) - cbc: 00000000 nop - cc0: 10650002 beq $v1,$a1,ccc - cc4: ac430000 sw $v1,0($v0) - cc8: 0200f025 move $s8,$s0 - ccc: 26100001 addiu $s0,$s0,1 - cd0: 2a020021 slti $v0,$s0,33 - cd4: 1440fff3 bnez $v0,ca4 - cd8: 00101080 sll $v0,$s0,0x2 - cdc: 2404001f li $a0,31 - ce0: 27a6073c addiu $a2,$sp,1852 - ce4: 27a50414 addiu $a1,$sp,1044 - ce8: 00041080 sll $v0,$a0,0x2 - cec: 00c21821 addu $v1,$a2,$v0 - cf0: 00a21021 addu $v0,$a1,$v0 - cf4: 8c420000 lw $v0,0($v0) - cf8: 2484ffff addiu $a0,$a0,-1 - cfc: 0481fffa bgez $a0,ce8 - d00: ac620000 sw $v0,0($v1) - d04: afa00848 sw $zero,2120($sp) - d08: 24100001 li $s0,1 - d0c: 27b40738 addiu $s4,$sp,1848 - d10: 241500ff li $s5,255 - d14: 3c020000 lui $v0,0x0 - d18: 24560000 addiu $s6,$v0,0 - d1c: 03c09025 move $s2,$s8 - d20: 1a400012 blez $s2,d6c - d24: 24130001 li $s3,1 - d28: 00121080 sll $v0,$s2,0x2 - d2c: 02828821 addu $s1,$s4,$v0 - d30: 8e220000 lw $v0,0($s1) - d34: 00000000 nop - d38: 10550009 beq $v0,$s5,d60 - d3c: 00000000 nop - d40: 0c0000a9 jal 2a4 - d44: 02422021 addu $a0,$s2,$v0 - d48: ae220000 sw $v0,0($s1) - d4c: 00021080 sll $v0,$v0,0x2 - d50: 00561021 addu $v0,$v0,$s6 - d54: 8c420000 lw $v0,0($v0) - d58: 00000000 nop - d5c: 02629826 xor $s3,$s3,$v0 - d60: 2652ffff addiu $s2,$s2,-1 - d64: 1e40fff1 bgtz $s2,d2c - d68: 00121080 sll $v0,$s2,0x2 - d6c: 00000000 nop - d70: 1660000b bnez $s3,da0 - d74: 00000000 nop - d78: 8fa70848 lw $a3,2120($sp) - d7c: 00000000 nop - d80: 00071880 sll $v1,$a3,0x2 - d84: 03a31021 addu $v0,$sp,$v1 - d88: ac5006b8 sw $s0,1720($v0) - d8c: 00401825 move $v1,$v0 - d90: 02b01023 subu $v0,$s5,$s0 - d94: ac6207c0 sw $v0,1984($v1) - d98: 24e70001 addiu $a3,$a3,1 - d9c: afa70848 sw $a3,2120($sp) - da0: 26100001 addiu $s0,$s0,1 - da4: 2a020100 slti $v0,$s0,256 - da8: 1440ffdc bnez $v0,d1c - dac: 00000000 nop - db0: 8fa70848 lw $a3,2120($sp) - db4: 00000000 nop - db8: 13c70003 beq $s8,$a3,dc8 - dbc: 00008025 move $s0,$zero - dc0: 100000a8 b 1064 - dc4: 2402ffff li $v0,-1 - dc8: afa00844 sw $zero,2116($sp) - dcc: 27b40498 addiu $s4,$sp,1176 - dd0: 241500ff li $s5,255 - dd4: 27b30410 addiu $s3,$sp,1040 - dd8: 3c020000 lui $v0,0x0 - ddc: 24560000 addiu $s6,$v0,0 - de0: 00008825 move $s1,$zero - de4: 03d0102a slt $v0,$s8,$s0 - de8: 10400002 beqz $v0,df4 - dec: 02009025 move $s2,$s0 - df0: 03c09025 move $s2,$s8 - df4: 06400017 bltz $s2,e54 - df8: 2642ffff addiu $v0,$s2,-1 - dfc: 02021023 subu $v0,$s0,$v0 - e00: 00021080 sll $v0,$v0,0x2 - e04: 02821021 addu $v0,$s4,$v0 - e08: 8c440000 lw $a0,0($v0) - e0c: 00000000 nop - e10: 1095000d beq $a0,$s5,e48 - e14: 00121080 sll $v0,$s2,0x2 - e18: 02621021 addu $v0,$s3,$v0 - e1c: 8c420000 lw $v0,0($v0) - e20: 00000000 nop - e24: 10550008 beq $v0,$s5,e48 - e28: 00000000 nop - e2c: 0c0000a9 jal 2a4 - e30: 00822021 addu $a0,$a0,$v0 - e34: 00021080 sll $v0,$v0,0x2 - e38: 00561021 addu $v0,$v0,$s6 - e3c: 8c420000 lw $v0,0($v0) - e40: 00000000 nop - e44: 02228826 xor $s1,$s1,$v0 - e48: 2652ffff addiu $s2,$s2,-1 - e4c: 0641ffeb bgez $s2,dfc - e50: 2642ffff addiu $v0,$s2,-1 - e54: 12200002 beqz $s1,e60 - e58: 00101080 sll $v0,$s0,0x2 - e5c: afb00844 sw $s0,2116($sp) - e60: 03a22021 addu $a0,$sp,$v0 - e64: 3c030000 lui $v1,0x0 - e68: 24630000 addiu $v1,$v1,0 - e6c: 00111080 sll $v0,$s1,0x2 - e70: 00431021 addu $v0,$v0,$v1 - e74: 8c420000 lw $v0,0($v0) - e78: 00000000 nop - e7c: ac820630 sw $v0,1584($a0) - e80: 26100001 addiu $s0,$s0,1 - e84: 2a020020 slti $v0,$s0,32 - e88: 1440ffd5 bnez $v0,de0 - e8c: 240200ff li $v0,255 - e90: afa206b0 sw $v0,1712($sp) - e94: 8fa70848 lw $a3,2120($sp) - e98: 00000000 nop - e9c: 24f2ffff addiu $s2,$a3,-1 - ea0: 0640006f bltz $s2,1060 - ea4: 27a70630 addiu $a3,$sp,1584 - ea8: afa70850 sw $a3,2128($sp) - eac: 27a706b8 addiu $a3,$sp,1720 - eb0: afa70854 sw $a3,2132($sp) - eb4: 3c020000 lui $v0,0x0 - eb8: 24570000 addiu $s7,$v0,0 - ebc: 8fb00844 lw $s0,2116($sp) - ec0: 00000000 nop - ec4: 0600001b bltz $s0,f34 - ec8: 00009825 move $s3,$zero - ecc: 00121080 sll $v0,$s2,0x2 - ed0: 8fa70854 lw $a3,2132($sp) - ed4: 00000000 nop - ed8: 00e28821 addu $s1,$a3,$v0 - edc: 00101080 sll $v0,$s0,0x2 - ee0: 8fa70850 lw $a3,2128($sp) - ee4: 00000000 nop - ee8: 00e21021 addu $v0,$a3,$v0 - eec: 8c430000 lw $v1,0($v0) - ef0: 240700ff li $a3,255 - ef4: 1067000c beq $v1,$a3,f28 - ef8: 00000000 nop - efc: 8e220000 lw $v0,0($s1) - f00: 00000000 nop - f04: 02020018 mult $s0,$v0 - f08: 00003812 mflo $a3 - f0c: 0c0000a9 jal 2a4 - f10: 00e32021 addu $a0,$a3,$v1 - f14: 00021080 sll $v0,$v0,0x2 - f18: 00571021 addu $v0,$v0,$s7 - f1c: 8c420000 lw $v0,0($v0) - f20: 00000000 nop - f24: 02629826 xor $s3,$s3,$v0 - f28: 2610ffff addiu $s0,$s0,-1 - f2c: 0601ffec bgez $s0,ee0 - f30: 00101080 sll $v0,$s0,0x2 - f34: 0c0000a9 jal 2a4 - f38: 240400ff li $a0,255 - f3c: 00021080 sll $v0,$v0,0x2 - f40: 00571021 addu $v0,$v0,$s7 - f44: 8c560000 lw $s6,0($v0) - f48: 03c01825 move $v1,$s8 - f4c: 28620020 slti $v0,$v1,32 - f50: 14400002 bnez $v0,f5c - f54: 00008825 move $s1,$zero - f58: 2403001f li $v1,31 - f5c: 2402fffe li $v0,-2 - f60: 00628024 and $s0,$v1,$v0 - f64: 0600001a bltz $s0,fd0 - f68: 00121080 sll $v0,$s2,0x2 - f6c: 27b50410 addiu $s5,$sp,1040 - f70: 8fa70854 lw $a3,2132($sp) - f74: 00000000 nop - f78: 00e2a021 addu $s4,$a3,$v0 - f7c: 26020001 addiu $v0,$s0,1 - f80: 00021080 sll $v0,$v0,0x2 - f84: 02a21021 addu $v0,$s5,$v0 - f88: 8c430000 lw $v1,0($v0) - f8c: 240700ff li $a3,255 - f90: 1067000c beq $v1,$a3,fc4 - f94: 00000000 nop - f98: 8e820000 lw $v0,0($s4) - f9c: 00000000 nop - fa0: 02020018 mult $s0,$v0 - fa4: 00003812 mflo $a3 - fa8: 0c0000a9 jal 2a4 - fac: 00e32021 addu $a0,$a3,$v1 - fb0: 00021080 sll $v0,$v0,0x2 - fb4: 00571021 addu $v0,$v0,$s7 - fb8: 8c420000 lw $v0,0($v0) - fbc: 00000000 nop - fc0: 02228826 xor $s1,$s1,$v0 - fc4: 2610fffe addiu $s0,$s0,-2 - fc8: 0601ffed bgez $s0,f80 - fcc: 26020001 addiu $v0,$s0,1 - fd0: 12200024 beqz $s1,1064 - fd4: 2402ffff li $v0,-1 - fd8: 1260001e beqz $s3,1054 - fdc: 3c040000 lui $a0,0x0 - fe0: 24840000 addiu $a0,$a0,0 - fe4: 00131880 sll $v1,$s3,0x2 - fe8: 00641821 addu $v1,$v1,$a0 - fec: 00161080 sll $v0,$s6,0x2 - ff0: 00441021 addu $v0,$v0,$a0 - ff4: 8c630000 lw $v1,0($v1) - ff8: 8c420000 lw $v0,0($v0) - ffc: 00000000 nop - 1000: 00621821 addu $v1,$v1,$v0 - 1004: 00111080 sll $v0,$s1,0x2 - 1008: 00441021 addu $v0,$v0,$a0 - 100c: 8c440000 lw $a0,0($v0) - 1010: 00000000 nop - 1014: 2484ff01 addiu $a0,$a0,-255 - 1018: 0c0000a9 jal 2a4 - 101c: 00642023 subu $a0,$v1,$a0 - 1020: 00121880 sll $v1,$s2,0x2 - 1024: 03a31821 addu $v1,$sp,$v1 - 1028: 8c6407c0 lw $a0,1984($v1) - 102c: 8fa70880 lw $a3,2176($sp) - 1030: 00000000 nop - 1034: 00e42021 addu $a0,$a3,$a0 - 1038: 00021080 sll $v0,$v0,0x2 - 103c: 00571021 addu $v0,$v0,$s7 - 1040: 90830000 lbu $v1,0($a0) - 1044: 90420003 lbu $v0,3($v0) - 1048: 00000000 nop - 104c: 00621826 xor $v1,$v1,$v0 - 1050: a0830000 sb $v1,0($a0) - 1054: 2652ffff addiu $s2,$s2,-1 - 1058: 0641ff98 bgez $s2,ebc - 105c: 00000000 nop - 1060: 8fa20848 lw $v0,2120($sp) - 1064: 8fbf087c lw $ra,2172($sp) - 1068: 8fbe0878 lw $s8,2168($sp) - 106c: 8fb70874 lw $s7,2164($sp) - 1070: 8fb60870 lw $s6,2160($sp) - 1074: 8fb5086c lw $s5,2156($sp) - 1078: 8fb40868 lw $s4,2152($sp) - 107c: 8fb30864 lw $s3,2148($sp) - 1080: 8fb20860 lw $s2,2144($sp) - 1084: 8fb1085c lw $s1,2140($sp) - 1088: 8fb00858 lw $s0,2136($sp) - 108c: 03e00008 jr $ra - 1090: 27bd0880 addiu $sp,$sp,2176 - -00001094 : - 1094: 27bdfbd8 addiu $sp,$sp,-1064 - 1098: afbf0420 sw $ra,1056($sp) - 109c: afb3041c sw $s3,1052($sp) - 10a0: afb20418 sw $s2,1048($sp) - 10a4: afb10414 sw $s1,1044($sp) - 10a8: afb00410 sw $s0,1040($sp) - 10ac: 00809825 move $s3,$a0 - 10b0: 00a09025 move $s2,$a1 - 10b4: 00002025 move $a0,$zero - 10b8: 27a30010 addiu $v1,$sp,16 - 10bc: 00041080 sll $v0,$a0,0x2 - 10c0: 00621021 addu $v0,$v1,$v0 - 10c4: ac440000 sw $a0,0($v0) - 10c8: 24840001 addiu $a0,$a0,1 - 10cc: 288200ff slti $v0,$a0,255 - 10d0: 1440fffb bnez $v0,10c0 - 10d4: 00041080 sll $v0,$a0,0x2 - 10d8: 241000fe li $s0,254 - 10dc: 27b10010 addiu $s1,$sp,16 - 10e0: 0c00005c jal 170 - 10e4: 00000000 nop - 10e8: 16000002 bnez $s0,10f4 - 10ec: 0050001b divu $zero,$v0,$s0 - 10f0: 0007000d break 0x7 - 10f4: 00002010 mfhi $a0 - 10f8: 00042080 sll $a0,$a0,0x2 - 10fc: 02242021 addu $a0,$s1,$a0 - 1100: 8c850000 lw $a1,0($a0) - 1104: 00101880 sll $v1,$s0,0x2 - 1108: 02231821 addu $v1,$s1,$v1 - 110c: 8c620000 lw $v0,0($v1) - 1110: 00000000 nop - 1114: ac820000 sw $v0,0($a0) - 1118: 2610ffff addiu $s0,$s0,-1 - 111c: 1e00fff0 bgtz $s0,10e0 - 1120: ac650000 sw $a1,0($v1) - 1124: 1a40000c blez $s2,1158 - 1128: 00002025 move $a0,$zero - 112c: 27a50010 addiu $a1,$sp,16 - 1130: 00041080 sll $v0,$a0,0x2 - 1134: 00531821 addu $v1,$v0,$s3 - 1138: 00a21021 addu $v0,$a1,$v0 - 113c: 8c420000 lw $v0,0($v0) - 1140: 00000000 nop - 1144: ac620000 sw $v0,0($v1) - 1148: 24840001 addiu $a0,$a0,1 - 114c: 0092102a slt $v0,$a0,$s2 - 1150: 1440fff8 bnez $v0,1134 - 1154: 00041080 sll $v0,$a0,0x2 - 1158: 8fbf0420 lw $ra,1056($sp) - 115c: 8fb3041c lw $s3,1052($sp) - 1160: 8fb20418 lw $s2,1048($sp) - 1164: 8fb10414 lw $s1,1044($sp) - 1168: 8fb00410 lw $s0,1040($sp) - 116c: 03e00008 jr $ra - 1170: 27bd0428 addiu $sp,$sp,1064 - -00001174 : - 1174: 27bdffe8 addiu $sp,$sp,-24 - 1178: afbf0010 sw $ra,16($sp) - 117c: 0c00005c jal 170 - 1180: 00000000 nop - 1184: 304200ff andi $v0,$v0,0xff - 1188: 1040fffc beqz $v0,117c - 118c: 00000000 nop - 1190: 8fbf0010 lw $ra,16($sp) - 1194: 00000000 nop - 1198: 03e00008 jr $ra - 119c: 27bd0018 addiu $sp,$sp,24 - -000011a0 : - 11a0: 27bdffb8 addiu $sp,$sp,-72 - 11a4: afbf0044 sw $ra,68($sp) - 11a8: afbe0040 sw $s8,64($sp) - 11ac: afb7003c sw $s7,60($sp) - 11b0: afb60038 sw $s6,56($sp) - 11b4: afb50034 sw $s5,52($sp) - 11b8: afb40030 sw $s4,48($sp) - 11bc: afb3002c sw $s3,44($sp) - 11c0: afb20028 sw $s2,40($sp) - 11c4: afb10024 sw $s1,36($sp) - 11c8: afb00020 sw $s0,32($sp) - 11cc: 2416000b li $s6,11 - 11d0: 2413000a li $s3,10 - 11d4: 3c040000 lui $a0,0x0 - 11d8: 0c000023 jal 8c - 11dc: 24840000 addiu $a0,$a0,0 - 11e0: 3c040000 lui $a0,0x0 - 11e4: 0c000023 jal 8c - 11e8: 2484002c addiu $a0,$a0,44 - 11ec: 0c00006c jal 1b0 - 11f0: 240400ff li $a0,255 - 11f4: 3c040000 lui $a0,0x0 - 11f8: 0c000023 jal 8c - 11fc: 24840044 addiu $a0,$a0,68 - 1200: 0c00006c jal 1b0 - 1204: 240400df li $a0,223 - 1208: 3c040000 lui $a0,0x0 - 120c: 0c000023 jal 8c - 1210: 24840048 addiu $a0,$a0,72 - 1214: 0c00006c jal 1b0 - 1218: 24040100 li $a0,256 - 121c: 3c040000 lui $a0,0x0 - 1220: 0c000023 jal 8c - 1224: 24840054 addiu $a0,$a0,84 - 1228: 3c040000 lui $a0,0x0 - 122c: 0c000023 jal 8c - 1230: 24840058 addiu $a0,$a0,88 - 1234: 0c00006c jal 1b0 - 1238: 00002025 move $a0,$zero - 123c: 3c100000 lui $s0,0x0 - 1240: 0c000023 jal 8c - 1244: 2604005c addiu $a0,$s0,92 - 1248: 3c040000 lui $a0,0x0 - 124c: 0c000023 jal 8c - 1250: 24840060 addiu $a0,$a0,96 - 1254: 0c00006c jal 1b0 - 1258: 02602025 move $a0,$s3 - 125c: 3c040000 lui $a0,0x0 - 1260: 0c000023 jal 8c - 1264: 24840070 addiu $a0,$a0,112 - 1268: 0c00006c jal 1b0 - 126c: 02c02025 move $a0,$s6 - 1270: 0c000023 jal 8c - 1274: 2604005c addiu $a0,$s0,92 - 1278: 0c0000b6 jal 2d8 - 127c: 0000a025 move $s4,$zero - 1280: 3c040000 lui $a0,0x0 - 1284: 0c000023 jal 8c - 1288: 248400c8 addiu $a0,$a0,200 - 128c: afa00010 sw $zero,16($sp) - 1290: 24070078 li $a3,120 - 1294: 10e0009b beqz $a3,1504 - 1298: afa00014 sw $zero,20($sp) - 129c: 0200b825 move $s7,$s0 - 12a0: 3c020000 lui $v0,0x0 - 12a4: 245e0000 addiu $s8,$v0,0 - 12a8: 24070001 li $a3,1 - 12ac: 0007382b sltu $a3,$zero,$a3 - 12b0: afa70018 sw $a3,24($sp) - 12b4: 3c020000 lui $v0,0x0 - 12b8: 24550000 addiu $s5,$v0,0 - 12bc: 24070001 li $a3,1 - 12c0: 10e00005 beqz $a3,12d8 - 12c4: 3c040000 lui $a0,0x0 - 12c8: 0c000023 jal 8c - 12cc: 248400d8 addiu $a0,$a0,216 - 12d0: 0c00006c jal 1b0 - 12d4: 02802025 move $a0,$s4 - 12d8: 0c000023 jal 8c - 12dc: 26e4005c addiu $a0,$s7,92 - 12e0: 00008025 move $s0,$zero - 12e4: 0c00005c jal 170 - 12e8: 00000000 nop - 12ec: 021e1821 addu $v1,$s0,$s8 - 12f0: a0620000 sb $v0,0($v1) - 12f4: 26100001 addiu $s0,$s0,1 - 12f8: 2a0200df slti $v0,$s0,223 - 12fc: 1440fff9 bnez $v0,12e4 - 1300: 03c02025 move $a0,$s8 - 1304: 0c000184 jal 610 - 1308: 27c500df addiu $a1,$s8,223 - 130c: 3c070000 lui $a3,0x0 - 1310: 24e40000 addiu $a0,$a3,0 - 1314: 0c000425 jal 1094 - 1318: 02762821 addu $a1,$s3,$s6 - 131c: 0013102b sltu $v0,$zero,$s3 - 1320: 8fa70018 lw $a3,24($sp) - 1324: 00000000 nop - 1328: 00e21024 and $v0,$a3,$v0 - 132c: 10400016 beqz $v0,1388 - 1330: 0016102b sltu $v0,$zero,$s6 - 1334: 3c040000 lui $a0,0x0 - 1338: 0c000023 jal 8c - 133c: 248400e4 addiu $a0,$a0,228 - 1340: 1260000c beqz $s3,1374 - 1344: 00008025 move $s0,$zero - 1348: 3c070000 lui $a3,0x0 - 134c: 0c000023 jal 8c - 1350: 24e40044 addiu $a0,$a3,68 - 1354: 00101080 sll $v0,$s0,0x2 - 1358: 00551021 addu $v0,$v0,$s5 - 135c: 8c440000 lw $a0,0($v0) - 1360: 0c00006c jal 1b0 - 1364: 26100001 addiu $s0,$s0,1 - 1368: 0213102a slt $v0,$s0,$s3 - 136c: 1440fff7 bnez $v0,134c - 1370: 3c070000 lui $a3,0x0 - 1374: 0c000023 jal 8c - 1378: 26e4005c addiu $a0,$s7,92 - 137c: 0016102b sltu $v0,$zero,$s6 - 1380: 8fa70018 lw $a3,24($sp) - 1384: 00000000 nop - 1388: 00e21024 and $v0,$a3,$v0 - 138c: 10400015 beqz $v0,13e4 - 1390: 3c040000 lui $a0,0x0 - 1394: 0c000023 jal 8c - 1398: 248400f0 addiu $a0,$a0,240 - 139c: 02608025 move $s0,$s3 - 13a0: 02161021 addu $v0,$s0,$s6 - 13a4: 0202102a slt $v0,$s0,$v0 - 13a8: 1040000c beqz $v0,13dc - 13ac: 3c070000 lui $a3,0x0 - 13b0: 02768821 addu $s1,$s3,$s6 - 13b4: 0c000023 jal 8c - 13b8: 24e40044 addiu $a0,$a3,68 - 13bc: 00101080 sll $v0,$s0,0x2 - 13c0: 00551021 addu $v0,$v0,$s5 - 13c4: 8c440000 lw $a0,0($v0) - 13c8: 0c00006c jal 1b0 - 13cc: 26100001 addiu $s0,$s0,1 - 13d0: 0211102a slt $v0,$s0,$s1 - 13d4: 1440fff7 bnez $v0,13b4 - 13d8: 3c070000 lui $a3,0x0 - 13dc: 0c000023 jal 8c - 13e0: 26e4005c addiu $a0,$s7,92 - 13e4: 3c070000 lui $a3,0x0 - 13e8: 24e40000 addiu $a0,$a3,0 - 13ec: 3c070000 lui $a3,0x0 - 13f0: 24e50000 addiu $a1,$a3,0 - 13f4: 0c00008d jal 234 - 13f8: 240600ff li $a2,255 - 13fc: 02761021 addu $v0,$s3,$s6 - 1400: 10400012 beqz $v0,144c - 1404: 00008025 move $s0,$zero - 1408: 3c020000 lui $v0,0x0 - 140c: 24520000 addiu $s2,$v0,0 - 1410: 02768821 addu $s1,$s3,$s6 - 1414: 0c00045d jal 1174 - 1418: 00000000 nop - 141c: 00101880 sll $v1,$s0,0x2 - 1420: 00751821 addu $v1,$v1,$s5 - 1424: 8c640000 lw $a0,0($v1) - 1428: 00000000 nop - 142c: 00922021 addu $a0,$a0,$s2 - 1430: 90830000 lbu $v1,0($a0) - 1434: 00000000 nop - 1438: 00621826 xor $v1,$v1,$v0 - 143c: 26100001 addiu $s0,$s0,1 - 1440: 0211102a slt $v0,$s0,$s1 - 1444: 1440fff3 bnez $v0,1414 - 1448: a0830000 sb $v1,0($a0) - 144c: 3c070000 lui $a3,0x0 - 1450: 24e40000 addiu $a0,$a3,0 - 1454: 3c070000 lui $a3,0x0 - 1458: 24e50000 addiu $a1,$a3,0 - 145c: 0c0001e1 jal 784 - 1460: 02603025 move $a2,$s3 - 1464: 24070001 li $a3,1 - 1468: 10e00008 beqz $a3,148c - 146c: 00408025 move $s0,$v0 - 1470: 3c040000 lui $a0,0x0 - 1474: 0c000023 jal 8c - 1478: 248400fc addiu $a0,$a0,252 - 147c: 0c00006c jal 1b0 - 1480: 02002025 move $a0,$s0 - 1484: 0c000023 jal 8c - 1488: 26e4005c addiu $a0,$s7,92 - 148c: 2402ffff li $v0,-1 - 1490: 16020008 bne $s0,$v0,14b4 - 1494: 3c070000 lui $a3,0x0 - 1498: 8fa70010 lw $a3,16($sp) - 149c: 00000000 nop - 14a0: 24e70001 addiu $a3,$a3,1 - 14a4: afa70010 sw $a3,16($sp) - 14a8: 3c040000 lui $a0,0x0 - 14ac: 10000010 b 14f0 - 14b0: 24840118 addiu $a0,$a0,280 - 14b4: 24e40000 addiu $a0,$a3,0 - 14b8: 3c070000 lui $a3,0x0 - 14bc: 24e50000 addiu $a1,$a3,0 - 14c0: 0c000099 jal 264 - 14c4: 240600ff li $a2,255 - 14c8: 10400007 beqz $v0,14e8 - 14cc: 3c040000 lui $a0,0x0 - 14d0: 8fa70014 lw $a3,20($sp) - 14d4: 00000000 nop - 14d8: 24e70001 addiu $a3,$a3,1 - 14dc: afa70014 sw $a3,20($sp) - 14e0: 10000003 b 14f0 - 14e4: 24840138 addiu $a0,$a0,312 - 14e8: 3c040000 lui $a0,0x0 - 14ec: 24840158 addiu $a0,$a0,344 - 14f0: 0c000023 jal 8c - 14f4: 26940001 addiu $s4,$s4,1 - 14f8: 2a820078 slti $v0,$s4,120 - 14fc: 1440ff70 bnez $v0,12c0 - 1500: 24070001 li $a3,1 - 1504: 3c040000 lui $a0,0x0 - 1508: 0c000023 jal 8c - 150c: 24840170 addiu $a0,$a0,368 - 1510: 0c00006c jal 1b0 - 1514: 24040078 li $a0,120 - 1518: 3c040000 lui $a0,0x0 - 151c: 0c000023 jal 8c - 1520: 24840184 addiu $a0,$a0,388 - 1524: 8fa40010 lw $a0,16($sp) - 1528: 0c00006c jal 1b0 - 152c: 00000000 nop - 1530: 3c040000 lui $a0,0x0 - 1534: 0c000023 jal 8c - 1538: 2484019c addiu $a0,$a0,412 - 153c: 8fa40014 lw $a0,20($sp) - 1540: 0c00006c jal 1b0 - 1544: 00000000 nop - 1548: 3c040000 lui $a0,0x0 - 154c: 0c000023 jal 8c - 1550: 2484005c addiu $a0,$a0,92 - 1554: 3c040000 lui $a0,0x0 - 1558: 0c000023 jal 8c - 155c: 248401b8 addiu $a0,$a0,440 - 1560: 00001025 move $v0,$zero - 1564: 8fbf0044 lw $ra,68($sp) - 1568: 8fbe0040 lw $s8,64($sp) - 156c: 8fb7003c lw $s7,60($sp) - 1570: 8fb60038 lw $s6,56($sp) - 1574: 8fb50034 lw $s5,52($sp) - 1578: 8fb40030 lw $s4,48($sp) - 157c: 8fb3002c lw $s3,44($sp) - 1580: 8fb20028 lw $s2,40($sp) - 1584: 8fb10024 lw $s1,36($sp) - 1588: 8fb00020 lw $s0,32($sp) - 158c: 03e00008 jr $ra - 1590: 27bd0048 addiu $sp,$sp,72 -Disassembly of section .rodata: - -00000000 <.rodata>: - 0: 49742074 0x49742074 - 4: 616b6573 0x616b6573 - 8: 20766572 addi $s6,$v1,25970 - c: 79206c6f 0x79206c6f - 10: 6e672074 0x6e672074 - 14: 696d6520 0x696d6520 - 18: 666f7220 0x666f7220 - 1c: 52544c20 0x52544c20 - 20: 53696d75 0x53696d75 - 24: 6c617469 0x6c617469 - 28: 6f6e2e00 0x6f6e2e00 - 2c: 52656564 0x52656564 - 30: 2d536f6c sltiu $s3,$t2,28524 - 34: 6f6d6f6e 0x6f6d6f6e - 38: 20636f64 addi $v1,$v1,28516 - 3c: 65206973 0x65206973 - 40: 20000000 addi $zero,$zero,0 - 44: 20000000 addi $zero,$zero,0 - 48: 6f766572 0x6f766572 - 4c: 20474628 addi $a3,$v0,17960 - 50: 00000000 nop - 54: 290a0000 slti $t2,$t0,0 - 58: 693d0000 0x693d0000 - 5c: 0a000000 j 8000000 - 60: 74657374 jalx 195cdd0 - 64: 20657261 addi $a1,$v1,29281 - 68: 73757265 0x73757265 - 6c: 733a2000 0x733a2000 - 70: 6572726f 0x6572726f - 74: 72732000 0x72732000 - 78: 5761726e 0x5761726e - 7c: 696e673a 0x696e673a - 80: 20000000 addi $zero,$zero,0 - 84: 6572726f 0x6572726f - 88: 72732061 0x72732061 - 8c: 6e642000 0x6e642000 - 90: 65726173 0x65726173 - 94: 75726573 jalx 5c995cc - 98: 20657863 addi $a1,$v1,30819 - 9c: 65656473 0x65656473 - a0: 20746865 addi $s4,$v1,26725 - a4: 20636f72 addi $v1,$v1,28530 - a8: 72656374 0x72656374 - ac: 696f6e20 0x696f6e20 - b0: 6162696c 0x6162696c - b4: 69747920 0x69747920 - b8: 6f662074 0x6f662074 - bc: 68652063 0x68652063 - c0: 6f64650a 0x6f64650a - c4: 00000000 nop - c8: 496e6974 0x496e6974 - cc: 5f525320 0x5f525320 - d0: 446f6e65 0x446f6e65 - d4: 00000000 nop - d8: 0a205472 j 88151c8 - dc: 69616c20 0x69616c20 - e0: 00000000 nop - e4: 20657261 addi $a1,$v1,29281 - e8: 73696e67 0x73696e67 - ec: 3a000000 xori $zero,$s0,0x0 - f0: 20657272 addi $a1,$v1,29298 - f4: 6f72696e 0x6f72696e - f8: 673a0000 0x673a0000 - fc: 65727273 0x65727273 - 100: 202b2065 addi $t3,$at,8293 - 104: 72617375 0x72617375 - 108: 72657320 0x72657320 - 10c: 636f7272 0x636f7272 - 110: 65637465 0x65637465 - 114: 643a2000 0x643a2000 - 118: 52532064 0x52532064 - 11c: 65636f64 0x65636f64 - 120: 65722064 0x65722064 - 124: 65746563 0x65746563 - 128: 74656420 jalx 1959080 - 12c: 6661696c 0x6661696c - 130: 7572650a jalx 5c99428 - 134: 00000000 nop - 138: 20556e64 addi $s5,$v0,28260 - 13c: 65746563 0x65746563 - 140: 74656420 jalx 1959080 - 144: 6465636f 0x6465636f - 148: 64696e67 0x64696e67 - 14c: 20666169 addi $a2,$v1,24937 - 150: 6c757265 0x6c757265 - 154: 210a0000 addi $t2,$t0,0 - 158: 436f6d70 c0 0x16f6d70 - 15c: 61726520 0x61726520 - 160: 446f6e65 0x446f6e65 - 164: 2e205061 sltiu $zero,$s1,20577 - 168: 73736564 0x73736564 - 16c: 2e0a0000 sltiu $t2,$s0,0 - 170: 0a0a0a20 j 8282880 - 174: 546f7461 0x546f7461 - 178: 6c205472 0x6c205472 - 17c: 69616c73 0x69616c73 - 180: 3a200000 xori $zero,$s1,0x0 - 184: 20646563 addi $a0,$v1,25955 - 188: 6f64696e 0x6f64696e - 18c: 67206661 0x67206661 - 190: 696c7572 0x696c7572 - 194: 65733a20 0x65733a20 - 198: 00000000 nop - 19c: 206e6f74 addi $t6,$v1,28532 - 1a0: 20646574 addi $a0,$v1,25972 - 1a4: 65637465 0x65637465 - 1a8: 64206279 0x64206279 - 1ac: 20646563 addi $a0,$v1,25955 - 1b0: 6f646572 0x6f646572 - 1b4: 3a200000 xori $zero,$s1,0x0 - 1b8: 2466696e addiu $a2,$v1,26990 - 1bc: 69736800 0x69736800 -Disassembly of section .data: - -00000000 : - 0: 00000001 0x1 - 4: 00000000 nop - 8: 00000001 0x1 - c: 00000001 0x1 - 10: 00000001 0x1 - ... - 20: 00000001 0x1 -Disassembly of section .sdata: - -00000000 <.sdata>: - 0: 00000001 0x1 Index: trunk/Soft/src/C/reed solomon/win32/RS.H =================================================================== --- trunk/Soft/src/C/reed solomon/win32/RS.H (revision 28) +++ trunk/Soft/src/C/reed solomon/win32/RS.H (nonexistent) @@ -1,51 +0,0 @@ -/* Global definitions for Reed-Solomon encoder/decoder - * Phil Karn KA9Q, September 1996 - * - * The parameters MM and KK specify the Reed-Solomon code parameters. - * - * Set MM to be the size of each code symbol in bits. The Reed-Solomon - * block size will then be NN = 2**M - 1 symbols. Supported values are - * defined in rs.c. - * - * Set KK to be the number of data symbols in each block, which must be - * less than the block size. The code will then be able to correct up - * to NN-KK erasures or (NN-KK)/2 errors, or combinations thereof with - * each error counting as two erasures. - */ -#define MM 8 /* RS code over GF(2**MM) - change to suit */ -#define KK 223 /* KK = number of information symbols */ - -#define NN ((1 << MM) - 1) - -#if (MM <= 8) -typedef unsigned char dtype; -#else -typedef unsigned int dtype; -#endif - -/* Initialization function */ -void init_rs(void); - -/* These two functions *must* be called in this order (e.g., - * by init_rs()) before any encoding/decoding - */ - -void generate_gf(void); /* Generate Galois Field */ -void gen_poly(void); /* Generate generator polynomial */ - -/* Reed-Solomon encoding - * data[] is the input block, parity symbols are placed in bb[] - * bb[] may lie past the end of the data, e.g., for (255,223): - * encode_rs(&data[0],&data[223]); - */ -int encode_rs(dtype data[], dtype bb[]); - -/* Reed-Solomon erasures-and-errors decoding - * The received block goes into data[], and a list of zero-origin - * erasure positions, if any, goes in eras_pos[] with a count in no_eras. - * - * The decoder corrects the symbols in place, if possible and returns - * the number of corrected symbols. If the codeword is illegal or - * uncorrectible, the data array is unchanged and -1 is returned - */ -int eras_dec_rs(dtype data[], int eras_pos[], int no_eras); Index: trunk/Soft/src/C/reed solomon/win32/rs.prj =================================================================== --- trunk/Soft/src/C/reed solomon/win32/rs.prj (revision 28) +++ trunk/Soft/src/C/reed solomon/win32/rs.prj (nonexistent) @@ -1,107 +0,0 @@ -[Project Header] -Version = 700 -Pathname = "/c/dev/Soc/Mips/Soft/test/C/reed solomon/win32/rs.prj" -CVI Dir = "/c/program files/national instruments/cvi70" -IVI Standard Root Dir = "/C/Program Files/IVI" -VXIplug&play Framework Dir = "/c/vxipnp/winnt" -Number of Files = 2 -Target Type = "Executable" -Flags = 16 - -[File 0001] -File Type = "Include" -Res Id = 1 -Path Is Rel = True -Path Rel To = "Project" -Path Rel Path = "RS.H" -Path = "/c/dev/Soc/Mips/Soft/test/C/reed solomon/win32/RS.H" -Exclude = False -Project Flags = 0 -Folder = "Include Files" - -[File 0002] -File Type = "CSource" -Res Id = 2 -Path Is Rel = True -Path Rel To = "Project" -Path Rel Path = "rs_tak.c" -Path = "/c/dev/Soc/Mips/Soft/test/C/reed solomon/win32/rs_tak.c" -Exclude = False -Compile Into Object File = False -Project Flags = 0 -Folder = "Source Files" - -[Folders] -User Interface Files Folder Not Added Yet = True -Instrument Files Folder Not Added Yet = True -Folder 0 = "Source Files" -Folder 1 = "Include Files" - -[Compiler Options] -Default Calling Convention = "cdecl" -Require Prototypes = True -Require Return Values = True -Enable Pointer Mismatch Warning = False -Enable Unreachable Code Warning = False -Enable Unreferenced Identifiers Warning = False -Enable Assignment In Conditional Warning = False -O Option Compatible With 5.0 = False -Uninitialized Locals Compile Warning = "Conservative" - -[Run Options] -Stack Size = 250000 -Image Base Address = 4194304 - -[Compiler Defines] -Compiler Defines = "/DWIN32_LEAN_AND_MEAN" - -[Create Executable] -Executable File_Debug Is Rel = True -Executable File_Debug Rel To = "Project" -Executable File_Debug Rel Path = "rs_dbg.exe" -Executable File_Debug = "/c/dev/Soc/Mips/Soft/test/C/reed solomon/win32/rs_dbg.exe" -Executable File_Release Is Rel = True -Executable File_Release Rel To = "Project" -Executable File_Release Rel Path = "rs.exe" -Executable File_Release = "/c/dev/Soc/Mips/Soft/test/C/reed solomon/win32/rs.exe" -Icon File Is Rel = False -Icon File = "" -Application Title = "" -DLL Exports = "Include File Symbols" -DLL Import Library Choice = "Gen Lib For Current Mode" -Use IVI Subdirectories for Import Libraries = False -Use VXIPNP Subdirectories for Import Libraries = False -Use Dflt Import Lib Base Name = True -Where to Copy DLL = "Do not copy" -Add Type Lib To DLL = False -Include Type Lib Help Links = False -Type Lib FP File Is Rel = False -Type Lib FP File = "" -Type Lib Guid = "" -Runtime Support = "Full Runtime Support" -Instrument Driver Support Only = False -Embed Project .UIRs = False -Generate Map File = False - -[External Compiler Support] -UIR Callbacks File Option = 0 -Using LoadExternalModule = False -Create Project Symbols File = True -UIR Callbacks Obj File Is Rel = False -UIR Callbacks Obj File = "" -Project Symbols H File Is Rel = False -Project Symbols H File = "" -Project Symbols Obj File Is Rel = False -Project Symbols Obj File = "" - -[ActiveX Server Options] -Specification File Is Rel = False -Specification File = "" -Source File Is Rel = False -Source File = "" -Include File Is Rel = False -Include File = "" -IDL File Is Rel = False -IDL File = "" -Register ActiveX Server = False - Index: trunk/Soft/src/C/reed solomon/win32/rs.cws =================================================================== --- trunk/Soft/src/C/reed solomon/win32/rs.cws (revision 28) +++ trunk/Soft/src/C/reed solomon/win32/rs.cws (nonexistent) @@ -1,116 +0,0 @@ -[Workspace Header] -Version = 700 -Pathname = "/c/dev/Soc/Mips/Soft/test/C/reed solomon/win32/rs.cws" -CVI Dir = "/c/program files/national instruments/cvi70" -IVI Standard Root Dir = "/C/Program Files/IVI" -VXIplug&play Framework Dir = "/c/vxipnp/winnt" -Number of Projects = 1 -Active Project = 1 -Project 0001 = "rs.prj" -Drag Bar Left = 248 -Window Top = 227 -Window Left = 86 -Window Bottom = 847 -Window Right = 912 -Maximized = True -Maximized Children = True -Max Number Of Errors = 20 -Track Include File Dependencies = True -Prompt For Missing Includes = True -Stop On First Error File = False -Bring Up Err Win For Warnings = True -Show Build Dialog = False -Save Changes Before Running = "Always" -Hide Windows = False -Global Hot Key = False -Break At First Statement = False -Sort Type = "File Name" -Number of Opened Files = 0 -MainColumnWidth = 225 -FileDateColumnWidth = 70 -FileSizeColumnWidth = 70 -StatusColumnWidth = 70 - -[Project Header 0001] -Version = 700 -Platform Code = 4 -Build Configuration = "Debug" -Warn User If Debugging Release = 1 -Batch Build Release = False -Batch Build Debug = False - -[File 0001] -Path = "/c/dev/Soc/Mips/Soft/test/C/reed solomon/win32/rs_tak.c" -File Type = "CSource" -Disk Date = 3248945394 -In Projects = "1," -Window Top = 30 -Window Left = -1 -Window Docked = True -Source Window State = "1,831,831,831,12,16,16,0,0,80,0,1,0,1,0,25,822,0,834,11," -Breakpoint 0001 = "748,0,enabled," -Breakpoint 0002 = "834,0,enabled," -Breakpoint 0003 = "835,0,enabled," -Breakpoint 0004 = "884,0,enabled," - -[File 0002] -Path = "/c/dev/Soc/Mips/Soft/test/C/reed solomon/win32/RS.H" -File Type = "Include" -Disk Date = 3197058050 -In Projects = "1," -Window Top = 95 -Window Left = 244 -Window Docked = True - -[Build Options 0001] -Generate Browse Info = True -Enable Uninitialized Locals Runtime Warning = True -Debugging Level = "Standard" -Break On Library Errors = True -Break On First Chance Exceptions = False - -[SCC Options 0001] -Use global settings = True -SCC Provider = "" -SCC Project = "" -Local Path = "" -Auxiliary Path = "" -Perform Same Action For .h File As For .uir File = "Ask" -Username = "" -Comment = "" -Use Default Username = False -Use Default Comment = True -Suppress CVI Error Messages = False - -[DLL Debugging Support 0001] -External Process Path = "" - -[Command Line Args 0001] -Command Line Args = "" - -[Watch Point 1] -Watch Expression = "data" -Update Display Continuously = True -Break When Value Changes = False -Scope = "Global To Project" -DllName = "rs_dbg.exe" -Project = 1 - -[Watch Point 2] -Watch Expression = "eras_pos" -Update Display Continuously = True -Break When Value Changes = False -Scope = "Global To Project" -DllName = "rs_dbg.exe" -Project = 1 - -[Watch Point 3] -Watch Expression = "work" -Update Display Continuously = True -Break When Value Changes = False -Scope = "Local" -File = "rs_tak.c" -Function = "fill_eras" -DllName = "rs_dbg.exe" -Project = 1 - Index: trunk/Soft/src/C/reed solomon/win32/rs_tak.c =================================================================== --- trunk/Soft/src/C/reed solomon/win32/rs_tak.c (revision 28) +++ trunk/Soft/src/C/reed solomon/win32/rs_tak.c (nonexistent) @@ -1,886 +0,0 @@ -//Reed Solomon Program -//This program is based on Phil Karn -//Rewritten for YACC CPU (has no C library) by Tak.Sugawara Apr.3.2005 -//Consideration for embedded CPU -// 1) Has no C library. Ex. Not have printf/random... -// 2) Not have plenty of stack - -#define PC - -#ifdef PC -#include -#endif - -#define POLY 0x80000057 - - - - -#define print_port 0x20000000//0x3ff0 -#define print_char_port 0x20000000//0x3ff1 -#define print_int_port 0x20000000//0x3ff2 -#define print_long_port 0x20000000//0x3ff4 - - - - - -#define uart_port 0x20000000//0x03ffc //for 16KRAM -#define uart_wport uart_port -#define uart_rport uart_port -#define int_set_address 0x20000000//0x03ff8 //for 16KRAM - - -void print_uart(unsigned char* ptr)// -{ - unsigned int uport; - #define WRITE_BUSY 0x0100 - - - while (*ptr) { - #ifdef PC - putchar(*(ptr++)); - #else - - do { - uport=*(volatile unsigned*) uart_port; - } while (uport & WRITE_BUSY); - *(volatile unsigned char*)uart_wport=*(ptr++); - #endif - } - //*(volatile unsigned char*)uart_wport=0x00;//Write Done -} - - -void putc_uart(unsigned char c)// -{ - unsigned int uport; - - - #ifdef PC - putchar(c); - #else - do { - uport=*(volatile unsigned*) uart_port; - } while (uport & WRITE_BUSY); - *(volatile unsigned char*)uart_wport=c; - #endif - -} - -unsigned char read_uart()//Verilog Test Bench Use -{ - unsigned uport; - uport= *(volatile unsigned *)uart_rport; - return uport; -} - -void print(unsigned char* ptr)//Verilog Test Bench Use -{ - - while (*ptr) { - #ifdef PC - putchar(*(ptr++)); - #else - *(volatile unsigned char*)print_port=*(ptr++); - #endif - } - #ifndef PC - *(volatile unsigned char*)print_port=0x00;//Write Done - #endif -} -void print_char(unsigned char val)//Little Endian write out 16bit number -{ - #ifdef PC - putchar(val); - #else - *(volatile unsigned char*)print_port=(unsigned char)val ; - #endif -} -void print_uchar(unsigned char val)//Little Endian write out 16bit number -{ - #ifdef PC - - printf("%x",val); - #else - *(volatile unsigned char*)print_char_port=(unsigned char)val ; - #endif -} - - - - - - - -static unsigned lfsr_state=1; - -unsigned random (void) -{ - if (lfsr_state & 0x1) - { - lfsr_state = (lfsr_state >> 1) ^ POLY; - } - else - { - lfsr_state = (lfsr_state >> 1); - } - return lfsr_state; -} -/* -void print_uart(unsigned char* ptr) -{ - while(*(ptr)) putchar(*(ptr++)); - -} -*/ -void print_num(unsigned long num) -{ - unsigned long digit,offset; - for(offset=1000;offset;offset/=10) { - digit=num/offset; - - putc_uart(digit+'0');//putchar(digit+'0'); - num-=digit*offset; - } -} - - #ifndef PC - -void memcpy(unsigned char* dest,unsigned char* source,unsigned size) -{ - unsigned i; - for (i=0;i< size;i++){ - *(dest++)=*(source++); - } -} -/**/ -unsigned memcmp(unsigned char* dest,unsigned char* source,unsigned size) -{ - unsigned i; - for (i=0;i< size;i++){ - if (*(dest++)!=*(source++) ) return 1; - } - return 0; -} - - #endif - -/* - * Reed-Solomon coding and decoding - * Phil Karn (karn@ka9q.ampr.org) September 1996 - * - * This file is derived from the program "new_rs_erasures.c" by Robert - * Morelos-Zaragoza (robert@spectra.eng.hawaii.edu) and Hari Thirumoorthy - * (harit@spectra.eng.hawaii.edu), Aug 1995 - * - * I've made changes to improve performance, clean up the code and make it - * easier to follow. Data is now passed to the encoding and decoding functions - * through arguments rather than in global arrays. The decode function returns - * the number of corrected symbols, or -1 if the word is uncorrectable. - * - * This code supports a symbol size from 2 bits up to 16 bits, - * implying a block size of 3 2-bit symbols (6 bits) up to 65535 - * 16-bit symbols (1,048,560 bits). The code parameters are set in rs.h. - * - * Note that if symbols larger than 8 bits are used, the type of each - * data array element switches from unsigned char to unsigned int. The - * caller must ensure that elements larger than the symbol range are - * not passed to the encoder or decoder. - * - */ -//#include -#include "rs.h" - -#if (KK >= NN) -#error "KK must be less than 2**MM - 1" -#endif - -/* This defines the type used to store an element of the Galois Field - * used by the code. Make sure this is something larger than a char if - * if anything larger than GF(256) is used. - * - * Note: unsigned char will work up to GF(256) but int seems to run - * faster on the Pentium. - */ -typedef int gf; - -/* Primitive polynomials - see Lin & Costello, Appendix A, - * and Lee & Messerschmitt, p. 453. - */ -#if(MM == 2)/* Admittedly silly */ -int Pp[MM+1] = { 1, 1, 1 }; - -#elif(MM == 3) -/* 1 + x + x^3 */ -int Pp[MM+1] = { 1, 1, 0, 1 }; - -#elif(MM == 4) -/* 1 + x + x^4 */ -int Pp[MM+1] = { 1, 1, 0, 0, 1 }; - -#elif(MM == 5) -/* 1 + x^2 + x^5 */ -int Pp[MM+1] = { 1, 0, 1, 0, 0, 1 }; - -#elif(MM == 6) -/* 1 + x + x^6 */ -int Pp[MM+1] = { 1, 1, 0, 0, 0, 0, 1 }; - -#elif(MM == 7) -/* 1 + x^3 + x^7 */ -int Pp[MM+1] = { 1, 0, 0, 1, 0, 0, 0, 1 }; - -#elif(MM == 8) -/* 1+x^2+x^3+x^4+x^8 */ -int Pp[MM+1] = { 1, 0, 1, 1, 1, 0, 0, 0, 1 }; - -#elif(MM == 9) -/* 1+x^4+x^9 */ -int Pp[MM+1] = { 1, 0, 0, 0, 1, 0, 0, 0, 0, 1 }; - -#elif(MM == 10) -/* 1+x^3+x^10 */ -int Pp[MM+1] = { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1 }; - -#elif(MM == 11) -/* 1+x^2+x^11 */ -int Pp[MM+1] = { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 }; - -#elif(MM == 12) -/* 1+x+x^4+x^6+x^12 */ -int Pp[MM+1] = { 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1 }; - -#elif(MM == 13) -/* 1+x+x^3+x^4+x^13 */ -int Pp[MM+1] = { 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 }; - -#elif(MM == 14) -/* 1+x+x^6+x^10+x^14 */ -int Pp[MM+1] = { 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1 }; - -#elif(MM == 15) -/* 1+x+x^15 */ -int Pp[MM+1] = { 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }; - -#elif(MM == 16) -/* 1+x+x^3+x^12+x^16 */ -int Pp[MM+1] = { 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1 }; - -#else -#error "MM must be in range 2-16" -#endif - -/* Alpha exponent for the first root of the generator polynomial */ -#define B0 1 - -/* index->polynomial form conversion table */ -gf Alpha_to[NN + 1]; - -/* Polynomial->index form conversion table */ -gf Index_of[NN + 1]; - -/* No legal value in index form represents zero, so - * we need a special value for this purpose - */ -#define A0 (NN) - -/* Generator polynomial g(x) - * Degree of g(x) = 2*TT - * has roots @**B0, @**(B0+1), ... ,@^(B0+2*TT-1) - */ -gf Gg[NN - KK + 1]; - -/* Compute x % NN, where NN is 2**MM - 1, - * without a slow divide - */ -static //inline -gf modnn(int x) -{ -// print_uart("modnn input="); print_num(x); - while (x >= NN) { - x -= NN; - x = (x >> MM) + (x & NN); - } -// print_uart("modnn output=");print_num(x); -// print_uart("\n"); - return x; -} - -#define min(a,b) ((a) < (b) ? (a) : (b)) - -#define CLEAR(a,n) { int ci; for(ci=(n)-1;ci >=0;ci--) (a)[ci] = 0; } - -#define COPY(a,b,n) { int ci; for(ci=(n)-1;ci >=0;ci--) (a)[ci] = (b)[ci]; } -#define COPYDOWN(a,b,n) { int ci; for(ci=(n)-1;ci >=0;ci--) (a)[ci] = (b)[ci]; } - -void init_rs(void) -{ - generate_gf(); - gen_poly(); -} - -/* generate GF(2**m) from the irreducible polynomial p(X) in p[0]..p[m] - lookup tables: index->polynomial form alpha_to[] contains j=alpha**i; - polynomial form -> index form index_of[j=alpha**i] = i - alpha=2 is the primitive element of GF(2**m) - HARI's COMMENT: (4/13/94) alpha_to[] can be used as follows: - Let @ represent the primitive element commonly called "alpha" that - is the root of the primitive polynomial p(x). Then in GF(2^m), for any - 0 <= i <= 2^m-2, - @^i = a(0) + a(1) @ + a(2) @^2 + ... + a(m-1) @^(m-1) - where the binary vector (a(0),a(1),a(2),...,a(m-1)) is the representation - of the integer "alpha_to[i]" with a(0) being the LSB and a(m-1) the MSB. Thus for - example the polynomial representation of @^5 would be given by the binary - representation of the integer "alpha_to[5]". - Similarily, index_of[] can be used as follows: - As above, let @ represent the primitive element of GF(2^m) that is - the root of the primitive polynomial p(x). In order to find the power - of @ (alpha) that has the polynomial representation - a(0) + a(1) @ + a(2) @^2 + ... + a(m-1) @^(m-1) - we consider the integer "i" whose binary representation with a(0) being LSB - and a(m-1) MSB is (a(0),a(1),...,a(m-1)) and locate the entry - "index_of[i]". Now, @^index_of[i] is that element whose polynomial - representation is (a(0),a(1),a(2),...,a(m-1)). - NOTE: - The element alpha_to[2^m-1] = 0 always signifying that the - representation of "@^infinity" = 0 is (0,0,0,...,0). - Similarily, the element index_of[0] = A0 always signifying - that the power of alpha which has the polynomial representation - (0,0,...,0) is "infinity". - -*/ - -void -generate_gf(void) -{ - register int i, mask; - - mask = 1; - Alpha_to[MM] = 0; - for (i = 0; i < MM; i++) { - Alpha_to[i] = mask; - Index_of[Alpha_to[i]] = i; - /* If Pp[i] == 1 then, term @^i occurs in poly-repr of @^MM */ - if (Pp[i] != 0) - Alpha_to[MM] ^= mask; /* Bit-wise EXOR operation */ - mask <<= 1; /* single left-shift */ - } - Index_of[Alpha_to[MM]] = MM; - /* - * Have obtained poly-repr of @^MM. Poly-repr of @^(i+1) is given by - * poly-repr of @^i shifted left one-bit and accounting for any @^MM - * term that may occur when poly-repr of @^i is shifted. - */ - mask >>= 1; - for (i = MM + 1; i < NN; i++) { - if (Alpha_to[i - 1] >= mask) - Alpha_to[i] = Alpha_to[MM] ^ ((Alpha_to[i - 1] ^ mask) << 1); - else - Alpha_to[i] = Alpha_to[i - 1] << 1; - Index_of[Alpha_to[i]] = i; - } - Index_of[0] = A0; - Alpha_to[NN] = 0; - //print_uart("index dump\n"); - //for (i=0;i 0; j--){ - if (Gg[j] != 0) - Gg[j] = Gg[j - 1] ^ Alpha_to[modnn((Index_of[Gg[j]]) + B0 + i - 1)]; - else - Gg[j] = Gg[j - 1]; - - // print_uart("Gg[");print_num(j);print_uart("]=");print_num(Gg[j]);print_uart("\n"); - // print_uart("Gg[");print_num(j-1);print_uart("]=");print_num(Gg[j-1]);print_uart("\n"); - } - /* Gg[0] can never be zero */ - Gg[0] = Alpha_to[modnn((Index_of[Gg[0]]) + B0 + i - 1)]; - } - /* convert Gg[] to index form for quicker encoding */ - for (i = 0; i <= NN - KK; i++) - Gg[i] = Index_of[Gg[i]]; - - //print_uart("Gg dump\n"); - //for (i=0;i<=NN-KK;i++){ - // print_uchar(Gg[i]); - // print_uart(" "); - //} - //print_uart("\n"); -} - - -/* - * take the string of symbols in data[i], i=0..(k-1) and encode - * systematically to produce NN-KK parity symbols in bb[0]..bb[NN-KK-1] data[] - * is input and bb[] is output in polynomial form. Encoding is done by using - * a feedback shift register with appropriate connections specified by the - * elements of Gg[], which was generated above. Codeword is c(X) = - * data(X)*X**(NN-KK)+ b(X) - */ -int -encode_rs(dtype data[KK], dtype bb[NN-KK]) -{ - register int i, j; - gf feedback; - - CLEAR(bb,NN-KK); - for (i = KK - 1; i >= 0; i--) { -#if (MM != 8) - if(data[i] > NN) - return -1; /* Illegal symbol */ -#endif - feedback = Index_of[data[i] ^ bb[NN - KK - 1]]; - if (feedback != A0) { /* feedback term is non-zero */ - for (j = NN - KK - 1; j > 0; j--) - if (Gg[j] != A0) - bb[j] = bb[j - 1] ^ Alpha_to[modnn(Gg[j] + feedback)]; - else - bb[j] = bb[j - 1]; - bb[0] = Alpha_to[modnn(Gg[0] + feedback)]; - } else { /* feedback term is zero. encoder becomes a - * single-byte shifter */ - for (j = NN - KK - 1; j > 0; j--) - bb[j] = bb[j - 1]; - bb[0] = 0; - } - } - return 0; -} - -/* - * Performs ERRORS+ERASURES decoding of RS codes. If decoding is successful, - * writes the codeword into data[] itself. Otherwise data[] is unaltered. - * - * Return number of symbols corrected, or -1 if codeword is illegal - * or uncorrectable. - * - * First "no_eras" erasures are declared by the calling program. Then, the - * maximum # of errors correctable is t_after_eras = floor((NN-KK-no_eras)/2). - * If the number of channel errors is not greater than "t_after_eras" the - * transmitted codeword will be recovered. Details of algorithm can be found - * in R. Blahut's "Theory ... of Error-Correcting Codes". - */ -int -eras_dec_rs(dtype data[NN], int eras_pos[NN-KK], int no_eras) -{ - int deg_lambda, el, deg_omega; - int i, j, r; - gf u,q,tmp,num1,num2,den,discr_r; - gf recd[NN]; - gf lambda[NN-KK + 1], s[NN-KK + 1]; /* Err+Eras Locator poly - * and syndrome poly */ - gf b[NN-KK + 1], t[NN-KK + 1], omega[NN-KK + 1]; - gf root[NN-KK], reg[NN-KK + 1], loc[NN-KK]; - int syn_error, count; - - /* data[] is in polynomial form, copy and convert to index form */ - for (i = NN-1; i >= 0; i--){ -#if (MM != 8) - if(data[i] > NN) - return -1; /* Illegal symbol */ -#endif - recd[i] = Index_of[data[i]]; - } - /* first form the syndromes; i.e., evaluate recd(x) at roots of g(x) - * namely @**(B0+i), i = 0, ... ,(NN-KK-1) - */ - syn_error = 0; - for (i = 1; i <= NN-KK; i++) { - tmp = 0; - for (j = 0; j < NN; j++) - if (recd[j] != A0) /* recd[j] in index form */ - tmp ^= Alpha_to[modnn(recd[j] + (B0+i-1)*j)]; - syn_error |= tmp; /* set flag if non-zero syndrome => - * error */ - /* store syndrome in index form */ - s[i] = Index_of[tmp]; - } - if (!syn_error) { - /* - * if syndrome is zero, data[] is a codeword and there are no - * errors to correct. So return data[] unmodified - */ - return 0; - } - CLEAR(&lambda[1],NN-KK); - lambda[0] = 1; - if (no_eras > 0) { - /* Init lambda to be the erasure locator polynomial */ - lambda[1] = Alpha_to[eras_pos[0]]; - for (i = 1; i < no_eras; i++) { - u = eras_pos[i]; - for (j = i+1; j > 0; j--) { - tmp = Index_of[lambda[j - 1]]; - if(tmp != A0) - lambda[j] ^= Alpha_to[modnn(u + tmp)]; - } - } -#ifdef ERASURE_DEBUG - /* find roots of the erasure location polynomial */ - for(i=1;i<=no_eras;i++) - reg[i] = Index_of[lambda[i]]; - count = 0; - for (i = 1; i <= NN; i++) { - q = 1; - for (j = 1; j <= no_eras; j++) - if (reg[j] != A0) { - reg[j] = modnn(reg[j] + j); - q ^= Alpha_to[reg[j]]; - } - if (!q) { - /* store root and error location - * number indices - */ - root[count] = i; - loc[count] = NN - i; - count++; - } - } - if (count != no_eras) { - print_uart("\n lambda(x) is WRONG\n"); - return -1; - } -#ifndef NO_PRINT - print_uart("\n Erasure positions as determined by roots of Eras Loc Poly:\n"); - for (i = 0; i < count; i++) - print_num(loc[i]); - print_uart("\n"); -#endif -#endif - } - for(i=0;i 0; j--) - if (reg[j] != A0) { - reg[j] = modnn(reg[j] + j); - q ^= Alpha_to[reg[j]]; - } - if (!q) { - /* store root (index-form) and error location number */ - root[count] = i; - loc[count] = NN - i; - count++; - } - } - -#ifdef DEBUG - print_uart("\n Final error positions:\t"); - for (i = 0; i < count; i++) - print_num(loc[i]); - print_uart("\n"); -#endif - if (deg_lambda != count) { - /* - * deg(lambda) unequal to number of roots => uncorrectable - * error detected - */ - return -1; - } - /* - * Compute err+eras evaluator poly omega(x) = s(x)*lambda(x) (modulo - * x**(NN-KK)). in index form. Also find deg(omega). - */ - deg_omega = 0; - for (i = 0; i < NN-KK;i++){ - tmp = 0; - j = (deg_lambda < i) ? deg_lambda : i; - for(;j >= 0; j--){ - if ((s[i + 1 - j] != A0) && (lambda[j] != A0)) - tmp ^= Alpha_to[modnn(s[i + 1 - j] + lambda[j])]; - } - if(tmp != 0) - deg_omega = i; - omega[i] = Index_of[tmp]; - } - omega[NN-KK] = A0; - - /* - * Compute error values in poly-form. num1 = omega(inv(X(l))), num2 = - * inv(X(l))**(B0-1) and den = lambda_pr(inv(X(l))) all in poly-form - */ - for (j = count-1; j >=0; j--) { - num1 = 0; - for (i = deg_omega; i >= 0; i--) { - if (omega[i] != A0) - num1 ^= Alpha_to[modnn(omega[i] + i * root[j])]; - } - num2 = Alpha_to[modnn(root[j] * (B0 - 1) + NN)]; - den = 0; - - /* lambda[i+1] for i even is the formal derivative lambda_pr of lambda[i] */ - for (i = min(deg_lambda,NN-KK-1) & ~1; i >= 0; i -=2) { - if(lambda[i+1] != A0) - den ^= Alpha_to[modnn(lambda[i+1] + i * root[j])]; - } - if (den == 0) { -#ifdef DEBUG - print_uart("\n ERROR: denominator = 0\n"); -#endif - return -1; - } - /* Apply error to data */ - if (num1 != 0) { - data[loc[j]] ^= Alpha_to[modnn(Index_of[num1] + Index_of[num2] + NN - Index_of[den])]; - } - } - return count; -} - -void -fill_eras(int eras_pos[],int n) -{ - int i,j,t,work[NN]; - - for(i=0;i0;j--){ - i = random() % j; /* not really uniform, I know */ - t = work[i]; - work[i] = work[j]; - work[j] = t; - } -#ifdef notdef - for(i=0;i0;i--){ - print_num(NN), print_uart(" "); print_num(KK); print_uart("over GF("); - print_num(NN+1);print_uart(")\n"); - print_uart("i=");print_num(i);print_uart("\n"); -// } - print_uart("test erasures: ");print_num(nerase);print_uart("errors ");print_num(nerrors);print_uart("\n"); - if(2*nerrors + nerase > NN-KK){ - print_uart("Warning: "); - print_num(nerrors); print_uart("errors and "); - print_num(nerase); print_uart("erasures exceeds the correction ability of the code\n"); - } - - init_rs(); - print_uart("Init_RS Done"); - - fails = detfails = 0; - for(trials=0;trials < ntrials;trials++) - { - if(verbose){ - print_uart("\n Trial "); - print_num(trials); - } - print_uart("\n"); - for(i=0;i -#endif - -//#define CHECK_UART_STATUS - - -#define POLY 0x80000057 - -#define print_port 0x01000000 -#define print_char_port 0x01000000 -#define print_int_port 0x01000000 -#define print_long_port 0x01000000 - - - - - -#define uart_port 0x01000000 -#define uart_wport uart_port -#define uart_rport uart_port -#define int_set_address 0x01000000//0x03ff8 //for 16KRAM - - -void print_uart(unsigned char* ptr)// -{ - unsigned int uport; - #define WRITE_BUSY 0x0100 - - - while (*ptr) { - #ifdef PC - putchar(*(ptr++)); - #else -#ifdef CHECK_UART_STATUS - do{ - uport=*(volatile unsigned*) uart_port; - } while (uport & WRITE_BUSY); -#endif //CHECK_UART_STATUS - *(volatile unsigned char*)uart_wport=*(ptr++); - #endif - } - //*(volatile unsigned char*)uart_wport=0x00;//Write Done -} - - -void putc_uart(unsigned char c)// -{ - unsigned int uport; - - - #ifdef PC - putchar(c); - #else -#ifdef CHECK_UART_STATUS - do { - uport=*(volatile unsigned*) uart_port; - } while (uport & WRITE_BUSY); -#endif// CHECK_UART_STATUS - *(volatile unsigned char*)uart_wport=c; - #endif - -} - -unsigned char read_uart()//Verilog Test Bench Use -{ - unsigned uport; - uport= *(volatile unsigned *)uart_rport; - return uport; -} - -void print(unsigned char* ptr)//Verilog Test Bench Use -{ - - while (*ptr) { - #ifdef PC - putchar(*(ptr++)); - #else - *(volatile unsigned char*)print_port=*(ptr++); - #endif - } - #ifndef PC - *(volatile unsigned char*)print_port=0x00;//Write Done - #endif -} -void print_char(unsigned char val)//Little Endian write out 16bit number -{ - #ifdef PC - putchar(val); - #else - *(volatile unsigned char*)print_port=(unsigned char)val ; - #endif -} -void print_uchar(unsigned char val)//Little Endian write out 16bit number -{ - #ifdef PC - - printf("%x",val); - #else - *(volatile unsigned char*)print_char_port=(unsigned char)val ; - #endif -} - - -static unsigned lfsr_state=1; - -unsigned random (void) -{ - if (lfsr_state & 0x1) - { - lfsr_state = (lfsr_state >> 1) ^ POLY; - } - else - { - lfsr_state = (lfsr_state >> 1); - } - return lfsr_state; -} -/* -void print_uart(unsigned char* ptr) -{ - while(*(ptr)) putchar(*(ptr++)); - -} -*/ -void print_num(unsigned long num) -{ - unsigned long digit,offset; - for(offset=1000;offset;offset/=10) { - digit=num/offset; - - putc_uart(digit+'0');//putchar(digit+'0'); - num-=digit*offset; - } -} - - #ifndef PC - -void memcpy(unsigned char* dest,unsigned char* source,unsigned size) -{ - unsigned i; - for (i=0;i< size;i++){ - *(dest++)=*(source++); - } -} -/**/ -unsigned memcmp(unsigned char* dest,unsigned char* source,unsigned size) -{ - unsigned i; - for (i=0;i< size;i++){ - if (*(dest++)!=*(source++) ) return 1; - } - return 0; -} - - #endif - -/* - * Reed-Solomon coding and decoding - * Phil Karn (karn@ka9q.ampr.org) September 1996 - * - * This file is derived from the program "new_rs_erasures.c" by Robert - * Morelos-Zaragoza (robert@spectra.eng.hawaii.edu) and Hari Thirumoorthy - * (harit@spectra.eng.hawaii.edu), Aug 1995 - * - * I've made changes to improve performance, clean up the code and make it - * easier to follow. Data is now passed to the encoding and decoding functions - * through arguments rather than in global arrays. The decode function returns - * the number of corrected symbols, or -1 if the word is uncorrectable. - * - * This code supports a symbol size from 2 bits up to 16 bits, - * implying a block size of 3 2-bit symbols (6 bits) up to 65535 - * 16-bit symbols (1,048,560 bits). The code parameters are set in rs.h. - * - * Note that if symbols larger than 8 bits are used, the type of each - * data array element switches from unsigned char to unsigned int. The - * caller must ensure that elements larger than the symbol range are - * not passed to the encoder or decoder. - * - */ -//#include -#include "rs.h" - -#if (KK >= NN) -#error "KK must be less than 2**MM - 1" -#endif - -/* This defines the type used to store an element of the Galois Field - * used by the code. Make sure this is something larger than a char if - * if anything larger than GF(256) is used. - * - * Note: unsigned char will work up to GF(256) but int seems to run - * faster on the Pentium. - */ -typedef int gf; - -/* Primitive polynomials - see Lin & Costello, Appendix A, - * and Lee & Messerschmitt, p. 453. - */ -#if(MM == 2)/* Admittedly silly */ -int Pp[MM+1] = { 1, 1, 1 }; - -#elif(MM == 3) -/* 1 + x + x^3 */ -int Pp[MM+1] = { 1, 1, 0, 1 }; - -#elif(MM == 4) -/* 1 + x + x^4 */ -int Pp[MM+1] = { 1, 1, 0, 0, 1 }; - -#elif(MM == 5) -/* 1 + x^2 + x^5 */ -int Pp[MM+1] = { 1, 0, 1, 0, 0, 1 }; - -#elif(MM == 6) -/* 1 + x + x^6 */ -int Pp[MM+1] = { 1, 1, 0, 0, 0, 0, 1 }; - -#elif(MM == 7) -/* 1 + x^3 + x^7 */ -int Pp[MM+1] = { 1, 0, 0, 1, 0, 0, 0, 1 }; - -#elif(MM == 8) -/* 1+x^2+x^3+x^4+x^8 */ -int Pp[MM+1] = { 1, 0, 1, 1, 1, 0, 0, 0, 1 }; - -#elif(MM == 9) -/* 1+x^4+x^9 */ -int Pp[MM+1] = { 1, 0, 0, 0, 1, 0, 0, 0, 0, 1 }; - -#elif(MM == 10) -/* 1+x^3+x^10 */ -int Pp[MM+1] = { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1 }; - -#elif(MM == 11) -/* 1+x^2+x^11 */ -int Pp[MM+1] = { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 }; - -#elif(MM == 12) -/* 1+x+x^4+x^6+x^12 */ -int Pp[MM+1] = { 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1 }; - -#elif(MM == 13) -/* 1+x+x^3+x^4+x^13 */ -int Pp[MM+1] = { 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1 }; - -#elif(MM == 14) -/* 1+x+x^6+x^10+x^14 */ -int Pp[MM+1] = { 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1 }; - -#elif(MM == 15) -/* 1+x+x^15 */ -int Pp[MM+1] = { 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }; - -#elif(MM == 16) -/* 1+x+x^3+x^12+x^16 */ -int Pp[MM+1] = { 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1 }; - -#else -#error "MM must be in range 2-16" -#endif - -/* Alpha exponent for the first root of the generator polynomial */ -#define B0 1 - -/* index->polynomial form conversion table */ -gf Alpha_to[NN + 1]; - -/* Polynomial->index form conversion table */ -gf Index_of[NN + 1]; - -/* No legal value in index form represents zero, so - * we need a special value for this purpose - */ -#define A0 (NN) - -/* Generator polynomial g(x) - * Degree of g(x) = 2*TT - * has roots @**B0, @**(B0+1), ... ,@^(B0+2*TT-1) - */ -gf Gg[NN - KK + 1]; - -/* Compute x % NN, where NN is 2**MM - 1, - * without a slow divide - */ -static //inline -gf modnn(int x) -{ -// print_uart("modnn input="); print_num(x); - while (x >= NN) { - x -= NN; - x = (x >> MM) + (x & NN); - } -// print_uart("modnn output=");print_num(x); -// print_uart("\n"); - return x; -} - -#define min(a,b) ((a) < (b) ? (a) : (b)) - -#define CLEAR(a,n) { int ci; for(ci=(n)-1;ci >=0;ci--) (a)[ci] = 0; } - -#define COPY(a,b,n) { int ci; for(ci=(n)-1;ci >=0;ci--) (a)[ci] = (b)[ci]; } -#define COPYDOWN(a,b,n) { int ci; for(ci=(n)-1;ci >=0;ci--) (a)[ci] = (b)[ci]; } - -void init_rs(void) -{ - generate_gf(); - gen_poly(); -} - -/* generate GF(2**m) from the irreducible polynomial p(X) in p[0]..p[m] - lookup tables: index->polynomial form alpha_to[] contains j=alpha**i; - polynomial form -> index form index_of[j=alpha**i] = i - alpha=2 is the primitive element of GF(2**m) - HARI's COMMENT: (4/13/94) alpha_to[] can be used as follows: - Let @ represent the primitive element commonly called "alpha" that - is the root of the primitive polynomial p(x). Then in GF(2^m), for any - 0 <= i <= 2^m-2, - @^i = a(0) + a(1) @ + a(2) @^2 + ... + a(m-1) @^(m-1) - where the binary vector (a(0),a(1),a(2),...,a(m-1)) is the representation - of the integer "alpha_to[i]" with a(0) being the LSB and a(m-1) the MSB. Thus for - example the polynomial representation of @^5 would be given by the binary - representation of the integer "alpha_to[5]". - Similarily, index_of[] can be used as follows: - As above, let @ represent the primitive element of GF(2^m) that is - the root of the primitive polynomial p(x). In order to find the power - of @ (alpha) that has the polynomial representation - a(0) + a(1) @ + a(2) @^2 + ... + a(m-1) @^(m-1) - we consider the integer "i" whose binary representation with a(0) being LSB - and a(m-1) MSB is (a(0),a(1),...,a(m-1)) and locate the entry - "index_of[i]". Now, @^index_of[i] is that element whose polynomial - representation is (a(0),a(1),a(2),...,a(m-1)). - NOTE: - The element alpha_to[2^m-1] = 0 always signifying that the - representation of "@^infinity" = 0 is (0,0,0,...,0). - Similarily, the element index_of[0] = A0 always signifying - that the power of alpha which has the polynomial representation - (0,0,...,0) is "infinity". - -*/ - -void -generate_gf(void) -{ - register int i, mask; - - mask = 1; - Alpha_to[MM] = 0; - for (i = 0; i < MM; i++) { - Alpha_to[i] = mask; - Index_of[Alpha_to[i]] = i; - /* If Pp[i] == 1 then, term @^i occurs in poly-repr of @^MM */ - if (Pp[i] != 0) - Alpha_to[MM] ^= mask; /* Bit-wise EXOR operation */ - mask <<= 1; /* single left-shift */ - } - Index_of[Alpha_to[MM]] = MM; - /* - * Have obtained poly-repr of @^MM. Poly-repr of @^(i+1) is given by - * poly-repr of @^i shifted left one-bit and accounting for any @^MM - * term that may occur when poly-repr of @^i is shifted. - */ - mask >>= 1; - for (i = MM + 1; i < NN; i++) { - if (Alpha_to[i - 1] >= mask) - Alpha_to[i] = Alpha_to[MM] ^ ((Alpha_to[i - 1] ^ mask) << 1); - else - Alpha_to[i] = Alpha_to[i - 1] << 1; - Index_of[Alpha_to[i]] = i; - } - Index_of[0] = A0; - Alpha_to[NN] = 0; - //print_uart("index dump\n"); - //for (i=0;i 0; j--){ - if (Gg[j] != 0) - Gg[j] = Gg[j - 1] ^ Alpha_to[modnn((Index_of[Gg[j]]) + B0 + i - 1)]; - else - Gg[j] = Gg[j - 1]; - - // print_uart("Gg[");print_num(j);print_uart("]=");print_num(Gg[j]);print_uart("\n"); - // print_uart("Gg[");print_num(j-1);print_uart("]=");print_num(Gg[j-1]);print_uart("\n"); - } - /* Gg[0] can never be zero */ - Gg[0] = Alpha_to[modnn((Index_of[Gg[0]]) + B0 + i - 1)]; - } - /* convert Gg[] to index form for quicker encoding */ - for (i = 0; i <= NN - KK; i++) - Gg[i] = Index_of[Gg[i]]; - - //print_uart("Gg dump\n"); - //for (i=0;i<=NN-KK;i++){ - // print_uchar(Gg[i]); - // print_uart(" "); - //} - //print_uart("\n"); -} - - -/* - * take the string of symbols in data[i], i=0..(k-1) and encode - * systematically to produce NN-KK parity symbols in bb[0]..bb[NN-KK-1] data[] - * is input and bb[] is output in polynomial form. Encoding is done by using - * a feedback shift register with appropriate connections specified by the - * elements of Gg[], which was generated above. Codeword is c(X) = - * data(X)*X**(NN-KK)+ b(X) - */ -int -encode_rs(dtype data[KK], dtype bb[NN-KK]) -{ - register int i, j; - gf feedback; - - CLEAR(bb,NN-KK); - for (i = KK - 1; i >= 0; i--) { -#if (MM != 8) - if(data[i] > NN) - return -1; /* Illegal symbol */ -#endif - feedback = Index_of[data[i] ^ bb[NN - KK - 1]]; - if (feedback != A0) { /* feedback term is non-zero */ - for (j = NN - KK - 1; j > 0; j--) - if (Gg[j] != A0) - bb[j] = bb[j - 1] ^ Alpha_to[modnn(Gg[j] + feedback)]; - else - bb[j] = bb[j - 1]; - bb[0] = Alpha_to[modnn(Gg[0] + feedback)]; - } else { /* feedback term is zero. encoder becomes a - * single-byte shifter */ - for (j = NN - KK - 1; j > 0; j--) - bb[j] = bb[j - 1]; - bb[0] = 0; - } - } - return 0; -} - -/* - * Performs ERRORS+ERASURES decoding of RS codes. If decoding is successful, - * writes the codeword into data[] itself. Otherwise data[] is unaltered. - * - * Return number of symbols corrected, or -1 if codeword is illegal - * or uncorrectable. - * - * First "no_eras" erasures are declared by the calling program. Then, the - * maximum # of errors correctable is t_after_eras = floor((NN-KK-no_eras)/2). - * If the number of channel errors is not greater than "t_after_eras" the - * transmitted codeword will be recovered. Details of algorithm can be found - * in R. Blahut's "Theory ... of Error-Correcting Codes". - */ -int -eras_dec_rs(dtype data[NN], int eras_pos[NN-KK], int no_eras) -{ - int deg_lambda, el, deg_omega; - int i, j, r; - gf u,q,tmp,num1,num2,den,discr_r; - gf recd[NN]; - gf lambda[NN-KK + 1], s[NN-KK + 1]; /* Err+Eras Locator poly - * and syndrome poly */ - gf b[NN-KK + 1], t[NN-KK + 1], omega[NN-KK + 1]; - gf root[NN-KK], reg[NN-KK + 1], loc[NN-KK]; - int syn_error, count; - - /* data[] is in polynomial form, copy and convert to index form */ - for (i = NN-1; i >= 0; i--){ -#if (MM != 8) - if(data[i] > NN) - return -1; /* Illegal symbol */ -#endif - recd[i] = Index_of[data[i]]; - } - /* first form the syndromes; i.e., evaluate recd(x) at roots of g(x) - * namely @**(B0+i), i = 0, ... ,(NN-KK-1) - */ - syn_error = 0; - for (i = 1; i <= NN-KK; i++) { - tmp = 0; - for (j = 0; j < NN; j++) - if (recd[j] != A0) /* recd[j] in index form */ - tmp ^= Alpha_to[modnn(recd[j] + (B0+i-1)*j)]; - syn_error |= tmp; /* set flag if non-zero syndrome => - * error */ - /* store syndrome in index form */ - s[i] = Index_of[tmp]; - } - if (!syn_error) { - /* - * if syndrome is zero, data[] is a codeword and there are no - * errors to correct. So return data[] unmodified - */ - return 0; - } - CLEAR(&lambda[1],NN-KK); - lambda[0] = 1; - if (no_eras > 0) { - /* Init lambda to be the erasure locator polynomial */ - lambda[1] = Alpha_to[eras_pos[0]]; - for (i = 1; i < no_eras; i++) { - u = eras_pos[i]; - for (j = i+1; j > 0; j--) { - tmp = Index_of[lambda[j - 1]]; - if(tmp != A0) - lambda[j] ^= Alpha_to[modnn(u + tmp)]; - } - } -#ifdef ERASURE_DEBUG - /* find roots of the erasure location polynomial */ - for(i=1;i<=no_eras;i++) - reg[i] = Index_of[lambda[i]]; - count = 0; - for (i = 1; i <= NN; i++) { - q = 1; - for (j = 1; j <= no_eras; j++) - if (reg[j] != A0) { - reg[j] = modnn(reg[j] + j); - q ^= Alpha_to[reg[j]]; - } - if (!q) { - /* store root and error location - * number indices - */ - root[count] = i; - loc[count] = NN - i; - count++; - } - } - if (count != no_eras) { - print_uart("\n lambda(x) is WRONG\n"); - return -1; - } -#ifndef NO_PRINT - print_uart("\n Erasure positions as determined by roots of Eras Loc Poly:\n"); - for (i = 0; i < count; i++) - print_num(loc[i]); - print_uart("\n"); -#endif -#endif - } - for(i=0;i 0; j--) - if (reg[j] != A0) { - reg[j] = modnn(reg[j] + j); - q ^= Alpha_to[reg[j]]; - } - if (!q) { - /* store root (index-form) and error location number */ - root[count] = i; - loc[count] = NN - i; - count++; - } - } - -#ifdef DEBUG - print_uart("\n Final error positions:\t"); - for (i = 0; i < count; i++) - print_num(loc[i]); - print_uart("\n"); -#endif - if (deg_lambda != count) { - /* - * deg(lambda) unequal to number of roots => uncorrectable - * error detected - */ - return -1; - } - /* - * Compute err+eras evaluator poly omega(x) = s(x)*lambda(x) (modulo - * x**(NN-KK)). in index form. Also find deg(omega). - */ - deg_omega = 0; - for (i = 0; i < NN-KK;i++){ - tmp = 0; - j = (deg_lambda < i) ? deg_lambda : i; - for(;j >= 0; j--){ - if ((s[i + 1 - j] != A0) && (lambda[j] != A0)) - tmp ^= Alpha_to[modnn(s[i + 1 - j] + lambda[j])]; - } - if(tmp != 0) - deg_omega = i; - omega[i] = Index_of[tmp]; - } - omega[NN-KK] = A0; - - /* - * Compute error values in poly-form. num1 = omega(inv(X(l))), num2 = - * inv(X(l))**(B0-1) and den = lambda_pr(inv(X(l))) all in poly-form - */ - for (j = count-1; j >=0; j--) { - num1 = 0; - for (i = deg_omega; i >= 0; i--) { - if (omega[i] != A0) - num1 ^= Alpha_to[modnn(omega[i] + i * root[j])]; - } - num2 = Alpha_to[modnn(root[j] * (B0 - 1) + NN)]; - den = 0; - - /* lambda[i+1] for i even is the formal derivative lambda_pr of lambda[i] */ - for (i = min(deg_lambda,NN-KK-1) & ~1; i >= 0; i -=2) { - if(lambda[i+1] != A0) - den ^= Alpha_to[modnn(lambda[i+1] + i * root[j])]; - } - if (den == 0) { -#ifdef DEBUG - print_uart("\n ERROR: denominator = 0\n"); -#endif - return -1; - } - /* Apply error to data */ - if (num1 != 0) { - data[loc[j]] ^= Alpha_to[modnn(Index_of[num1] + Index_of[num2] + NN - Index_of[den])]; - } - } - return count; -} - -void -fill_eras(int eras_pos[],int n) -{ - int i,j,t,work[NN]; - - for(i=0;i0;j--){ - i = random() % j; /* not really uniform, I know */ - t = work[i]; - work[i] = work[j]; - work[j] = t; - } -#ifdef notdef - for(i=0;i0;i--){ - print_num(NN), print_uart(" "); print_num(KK); print_uart(" over GF("); - print_num(NN+1);print_uart(")\n"); - print_uart("i=");print_num(i);print_uart("\n"); -// } - print_uart("test erasures: ");print_num(nerase);print_uart(" errors ");print_num(nerrors);print_uart("\n"); - if(2*nerrors + nerase > NN-KK){ - print_uart("Warning: "); - print_num(nerrors); print_uart("errors and "); - print_num(nerase); print_uart("erasures exceeds the correction ability of the code\n"); - } - - init_rs(); - print_uart("Init_RS Done"); - - fails = detfails = 0; - for(trials=0;trials < ntrials;trials++) - { - if(verbose) - { - print_uart("\n Trial "); - print_num(trials); - } - print_uart("\n"); - for(i=0;i pi.lst -rem copy test.map -rem copy list.txt - -%toolpath%\convert_bin pi -rem %toolpath%\convert_mips pi - -rem %toolpath%\mlite test.bin BD > test.txt - -rem %toolpath%\mlite test.bin - -move /Y *.txt %codepath% \ No newline at end of file Index: trunk/Soft/src/C/pi/pi.c =================================================================== --- trunk/Soft/src/C/pi/pi.c (revision 28) +++ trunk/Soft/src/C/pi/pi.c (nonexistent) @@ -1,23 +0,0 @@ -/*Calculate the value of PI. Takes a long time!*/ -#include "print.h" - -//long a=10000,b,c=56,d,e,f[57],g; -long a=10000,b,c=2800,d,e,f[2801],g; -int main() -{ - long a5=a/5; - - for(;b-c;) - f[b++]=a5; - - for( ; - d=0,g=c*2; - c-=14,print_num(e+d/a),e=d%a) - for( b=c; - d+=f[b]*a, f[b]=d%--g,d/=g--,--b; - d*=b); - - putchar("\nDone."); - return 0; -} - Index: trunk/Soft/src/C/pi/pi2.c =================================================================== --- trunk/Soft/src/C/pi/pi2.c (revision 28) +++ trunk/Soft/src/C/pi/pi2.c (nonexistent) @@ -1,110 +0,0 @@ -/*Calculate the value of PI. Takes a long time!*/ -void putchar(char); - -#define print_port 0x3ff0 -#define print_char_port 0x3ff1 -#define print_int_port 0x3ff2 -#define print_long_port 0x3ff4 - - - - - -#define uart_port 0x03ffc //for 16KRAM -#define uart_wport uart_port -#define uart_rport uart_port -#define int_set_address 0x03ff8 //for 16KRAM - -void print_uart(unsigned char* ptr)// -{ - unsigned int uport; - #define WRITE_BUSY 0x0100 - - - while (*ptr) { - - do { - uport=*(volatile unsigned*) uart_port; - } while (uport & WRITE_BUSY); - *(volatile unsigned char*)uart_wport=*(ptr++); - } -} - - -void putc_uart(unsigned char c)// -{ - unsigned int uport; - - - do { - uport=*(volatile unsigned*) uart_port; - } while (uport & WRITE_BUSY); - *(volatile unsigned char*)uart_wport=c; - -} - - -void print(unsigned char* ptr)//Verilog Test Bench Use -{ - - while (*ptr) { - - *(volatile unsigned char*)print_port=*(ptr++); - } - - *(volatile unsigned char*)print_port=0x00;//Write Done - -} -void print_char(unsigned char val)//Little Endian write out 16bit number -{ - *(volatile unsigned char*)print_port=(unsigned char)val ; - -} - -void print_num(unsigned long num) -{ - unsigned long digit,offset; - for(offset=1000;offset;offset/=10) { - digit=num/offset; - #ifdef RTL_SIM - print_char(digit+'0'); - #else - putc_uart(digit+'0'); - #endif - num-=digit*offset; - } -} - -//long a=10000,b,c=56,d,e,f[57],g; -long a=10000,b,c=2800,d,e,f[2801],g; -void main() -{ -#ifdef RTL_SIM - print("Calculating pi, it may take some minutes.\n"); -#else - print("Calculating pi 800 digits\n"); -#endif - - for(;b-c;)f[b++]=a/5; - for( ; - d=0,g=c*2; - c-=14,print_num(e+d/a),e=d%a) - for( - b=c; - d+=f[b]*a,f[b]=d%--g,d/=g--,--b; - d*=b); - -#ifdef RTL_SIM - - print_char('\n'); - print(""); - - print("$finish"); -#else - print_uart("\n Done.\n"); -#endif - - - -} -

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.