Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

who can help me to fix the error in MIPS those are the error, could you help me to fix it Error in /Users/Tiffany/Desktop/656 line

who can help me to fix the error in MIPS

those are the error, could you help me to fix it Error in /Users/Tiffany/Desktop/656 line 5 column 17: .module fp=32 Invalid language element: fp=32 Error in /Users/Tiffany/Desktop/656 line 16 column 23: .type main, @function Invalid language element: @function Error in /Users/Tiffany/Desktop/656 line 483 column 24: .type print, @function . Invalid language element: @function Error in /Users/Tiffany/Desktop/656 line 617 column 25: .type change, @function

.file 1 "" .section .mdebug.abi32 .previous .nan legacy .module fp=32 .module nooddspreg .abicalls .comm number,4,4 .text .align 2 .globl main .set nomips16 .set nomicromips .ent main .type main, @function main: .frame $fp,72,$31 # vars= 40, regs= 2/0, args= 16, gp= 8 .mask 0xc0000000,-4 .fmask 0x00000000,0 .set noreorder .cpload $25 .set nomacro addiu $sp,$sp,-72 sw $31,68($sp) sw $fp,64($sp) move $fp,$sp .cprestore 16 movz $31,$31,$0 li $2,1 # 0x1 sw $2,32($fp) li $2,1 # 0x1 sw $2,36($fp) li $2,1 # 0x1 sw $2,40($fp) sw $0,44($fp) li $2,2 # 0x2 sw $2,48($fp) li $2,2 # 0x2 sw $2,52($fp) li $2,2 # 0x2 sw $2,56($fp) addiu $2,$fp,32 move $4,$2 lw $2,%got(print)($28) nop move $25,$2 .reloc 1f,R_MIPS_JALR,print 1: jalr $25 nop lw $28,16($fp) b $L2 nop $L20: li $2,1 # 0x1 sw $2,28($fp) sw $0,24($fp) b $L3 nop $L6: lw $2,24($fp) nop sll $2,$2,2 addiu $3,$fp,24 addu $2,$3,$2 lw $3,8($2) li $2,1 # 0x1 bne $3,$2,$L4 nop lw $2,24($fp) nop addiu $2,$2,1 sll $2,$2,2 addiu $3,$fp,24 addu $2,$3,$2 lw $3,8($2) li $2,2 # 0x2 bne $3,$2,$L4 nop lw $2,24($fp) nop addiu $2,$2,2 sll $2,$2,2 addiu $3,$fp,24 addu $2,$3,$2 lw $2,8($2) nop bne $2,$0,$L4 nop addiu $3,$fp,32 lw $2,24($fp) nop sll $2,$2,2 addu $4,$3,$2 lw $2,24($fp) nop addiu $2,$2,2 addiu $3,$fp,32 sll $2,$2,2 addu $2,$3,$2 move $5,$2 lw $2,%got(change)($28) nop move $25,$2 .reloc 1f,R_MIPS_JALR,change 1: jalr $25 nop lw $28,16($fp) addiu $2,$fp,32 move $4,$2 lw $2,%got(print)($28) nop move $25,$2 .reloc 1f,R_MIPS_JALR,print 1: jalr $25 nop lw $28,16($fp) sw $0,28($fp) $L4: lw $2,24($fp) nop addiu $2,$2,1 sw $2,24($fp) $L3: lw $2,28($fp) nop beq $2,$0,$L5 nop lw $2,24($fp) nop slt $2,$2,5 bne $2,$0,$L6 nop $L5: sw $0,24($fp) b $L7 nop $L10: lw $2,24($fp) nop sll $2,$2,2 addiu $3,$fp,24 addu $2,$3,$2 lw $2,8($2) nop bne $2,$0,$L8 nop lw $2,24($fp) nop addiu $2,$2,1 sll $2,$2,2 addiu $3,$fp,24 addu $2,$3,$2 lw $3,8($2) li $2,1 # 0x1 bne $3,$2,$L8 nop lw $2,24($fp) nop addiu $2,$2,2 sll $2,$2,2 addiu $3,$fp,24 addu $2,$3,$2 lw $3,8($2) li $2,2 # 0x2 bne $3,$2,$L8 nop addiu $3,$fp,32 lw $2,24($fp) nop sll $2,$2,2 addu $4,$3,$2 lw $2,24($fp) nop addiu $2,$2,2 addiu $3,$fp,32 sll $2,$2,2 addu $2,$3,$2 move $5,$2 lw $2,%got(change)($28) nop move $25,$2 .reloc 1f,R_MIPS_JALR,change 1: jalr $25 nop lw $28,16($fp) addiu $2,$fp,32 move $4,$2 lw $2,%got(print)($28) nop move $25,$2 .reloc 1f,R_MIPS_JALR,print 1: jalr $25 nop lw $28,16($fp) sw $0,28($fp) $L8: lw $2,24($fp) nop addiu $2,$2,1 sw $2,24($fp) $L7: lw $2,28($fp) nop beq $2,$0,$L9 nop lw $2,24($fp) nop slt $2,$2,5 bne $2,$0,$L10 nop $L9: sw $0,24($fp) b $L11 nop $L15: lw $2,24($fp) nop sll $2,$2,2 addiu $3,$fp,24 addu $2,$3,$2 lw $3,8($2) li $2,1 # 0x1 bne $3,$2,$L12 nop lw $2,24($fp) nop addiu $2,$2,1 sll $2,$2,2 addiu $3,$fp,24 addu $2,$3,$2 lw $2,8($2) nop bne $2,$0,$L12 nop lw $2,24($fp) nop beq $2,$0,$L13 nop lw $2,24($fp) nop addiu $2,$2,-1 sll $2,$2,2 addiu $3,$fp,24 addu $2,$3,$2 lw $3,8($2) lw $2,24($fp) nop addiu $2,$2,2 sll $2,$2,2 addiu $4,$fp,24 addu $2,$4,$2 lw $2,8($2) nop beq $3,$2,$L12 nop $L13: addiu $3,$fp,32 lw $2,24($fp) nop sll $2,$2,2 addu $4,$3,$2 lw $2,24($fp) nop addiu $2,$2,1 addiu $3,$fp,32 sll $2,$2,2 addu $2,$3,$2 move $5,$2 lw $2,%got(change)($28) nop move $25,$2 .reloc 1f,R_MIPS_JALR,change 1: jalr $25 nop lw $28,16($fp) addiu $2,$fp,32 move $4,$2 lw $2,%got(print)($28) nop move $25,$2 .reloc 1f,R_MIPS_JALR,print 1: jalr $25 nop lw $28,16($fp) sw $0,28($fp) $L12: lw $2,24($fp) nop addiu $2,$2,1 sw $2,24($fp) $L11: lw $2,28($fp) nop beq $2,$0,$L14 nop lw $2,24($fp) nop slt $2,$2,6 bne $2,$0,$L15 nop $L14: sw $0,24($fp) b $L16 nop $L19: lw $2,24($fp) nop sll $2,$2,2 addiu $3,$fp,24 addu $2,$3,$2 lw $2,8($2) nop bne $2,$0,$L17 nop lw $2,24($fp) nop addiu $2,$2,1 sll $2,$2,2 addiu $3,$fp,24 addu $2,$3,$2 lw $3,8($2) li $2,2 # 0x2 bne $3,$2,$L17 nop lw $3,24($fp) li $2,5 # 0x5 beq $3,$2,$L18 nop lw $2,24($fp) nop addiu $2,$2,-1 sll $2,$2,2 addiu $3,$fp,24 addu $2,$3,$2 lw $3,8($2) lw $2,24($fp) nop addiu $2,$2,2 sll $2,$2,2 addiu $4,$fp,24 addu $2,$4,$2 lw $2,8($2) nop beq $3,$2,$L17 nop $L18: addiu $3,$fp,32 lw $2,24($fp) nop sll $2,$2,2 addu $4,$3,$2 lw $2,24($fp) nop addiu $2,$2,1 addiu $3,$fp,32 sll $2,$2,2 addu $2,$3,$2 move $5,$2 lw $2,%got(change)($28) nop move $25,$2 .reloc 1f,R_MIPS_JALR,change 1: jalr $25 nop lw $28,16($fp) addiu $2,$fp,32 move $4,$2 lw $2,%got(print)($28) nop move $25,$2 .reloc 1f,R_MIPS_JALR,print 1: jalr $25 nop lw $28,16($fp) sw $0,28($fp) $L17: lw $2,24($fp) nop addiu $2,$2,1 sw $2,24($fp) $L16: lw $2,28($fp) nop beq $2,$0,$L2 nop lw $2,24($fp) nop slt $2,$2,6 bne $2,$0,$L19 nop $L2: lw $3,32($fp) lw $2,36($fp) nop addu $3,$3,$2 lw $2,40($fp) nop addu $3,$3,$2 li $2,6 # 0x6 bne $3,$2,$L20 nop lw $3,48($fp) lw $2,52($fp) nop addu $3,$3,$2 lw $2,56($fp) nop addu $3,$3,$2 li $2,3 # 0x3 bne $3,$2,$L20 nop move $2,$0 move $sp,$fp lw $31,68($sp) lw $fp,64($sp) addiu $sp,$sp,72 j $31 nop .set macro .set reorder .end main .size main, .-main .rdata .align 2 $LC0: .ascii "No. %2d:\342\200\246\342\200\246\342\200\246\342\200\246" .ascii "\342\200\246\342\200\246\342\200\246\342\200\246\342\200" .ascii "\246..\012\000" .align 2 $LC1: .ascii " | %c\000" .align 2 $LC2: .ascii " |\012 \342\200\246\342\200\246\342\200\246\342\200\246\342" .ascii "\200\246\342\200\246\342\200\246\342\200\246\342\200\246" .ascii "..\012\000" .text .align 2 .globl print .set nomips16 .set nomicromips .ent print .type print, @function print: .frame $fp,40,$31 # vars= 8, regs= 2/0, args= 16, gp= 8 .mask 0xc0000000,-4 .fmask 0x00000000,0 .set noreorder .cpload $25 .set nomacro addiu $sp,$sp,-40 sw $31,36($sp) sw $fp,32($sp) move $fp,$sp .cprestore 16 movz $31,$31,$0 sw $4,40($fp) lw $2,%got(number)($28) nop lw $2,0($2) nop addiu $4,$2,1 lw $3,%got(number)($28) nop sw $4,0($3) move $5,$2 lw $2,%got($LC0)($28) nop addiu $4,$2,%lo($LC0) lw $2,%call16(printf)($28) nop move $25,$2 .reloc 1f,R_MIPS_JALR,printf 1: jalr $25 nop lw $28,16($fp) li $4,32 # 0x20 lw $2,%call16(putchar)($28) nop move $25,$2 .reloc 1f,R_MIPS_JALR,putchar 1: jalr $25 nop lw $28,16($fp) sw $0,24($fp) b $L23 nop $L28: lw $2,24($fp) nop sll $2,$2,2 lw $3,40($fp) nop addu $2,$3,$2 lw $3,0($2) li $2,1 # 0x1 beq $3,$2,$L24 nop lw $2,24($fp) nop sll $2,$2,2 lw $3,40($fp) nop addu $2,$3,$2 lw $3,0($2) li $2,2 # 0x2 bne $3,$2,$L25 nop li $2,64 # 0x40 b $L27 nop $L25: li $2,32 # 0x20 b $L27 nop $L24: li $2,42 # 0x2a $L27: move $5,$2 lw $2,%got($LC1)($28) nop addiu $4,$2,%lo($LC1) lw $2,%call16(printf)($28) nop move $25,$2 .reloc 1f,R_MIPS_JALR,printf 1: jalr $25 nop lw $28,16($fp) lw $2,24($fp) nop addiu $2,$2,1 sw $2,24($fp) $L23: lw $2,24($fp) nop slt $2,$2,7 bne $2,$0,$L28 nop lw $2,%got($LC2)($28) nop addiu $4,$2,%lo($LC2) lw $2,%call16(puts)($28) nop move $25,$2 .reloc 1f,R_MIPS_JALR,puts 1: jalr $25 nop lw $28,16($fp) nop move $sp,$fp lw $31,36($sp) lw $fp,32($sp) addiu $sp,$sp,40 j $31 nop .set macro .set reorder .end print .size print, .-print .align 2 .globl change .set nomips16 .set nomicromips .ent change .type change, @function change: .frame $fp,24,$31 # vars= 8, regs= 1/0, args= 0, gp= 8 .mask 0x40000000,-4 .fmask 0x00000000,0 .set noreorder .set nomacro addiu $sp,$sp,-24 sw $fp,20($sp) move $fp,$sp sw $4,24($fp) sw $5,28($fp) movz $31,$31,$0 lw $2,24($fp) nop lw $2,0($2) nop sw $2,8($fp) lw $2,28($fp) nop lw $3,0($2) lw $2,24($fp) nop sw $3,0($2) lw $2,28($fp) lw $3,8($fp) nop sw $3,0($2) nop move $sp,$fp lw $fp,20($sp) addiu $sp,$sp,24 j $31 nop .set macro .set reorder .end change .size change, .-change .ident "GCC: (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609"

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions