Project

General

Profile

Actions

Feature #10071

open

Влияние секции section_text на расположение exception_handler

Added by Alexander Protsenko over 4 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Category:
Configuration
Target version:
Start date:
01/24/2020
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

    section_text(:pa => 0x0000_2000, :va => 0x0000_2000) {}

    #
    # Defines .data section.
    #
    # pa: base physical address (used for memory allocation).
    # va: base virtual address (used for encoding instructions that refer to labels).
    #
    section_data(:pa => 0x0008_0000, :va => 0x0008_0000) {}

    #
    # Simple exception handler. Continues execution from the next instruction.
    #
    exception_handler {
      entry_point(:org => 0x380, :exception => ['IntegerOverflow', 'SystemCall', 'Breakpoint']) {
        trace 'Exception handler (EPC = 0x%x)', location('COP0_R', 14)
        mfc0 ra, rcop0(14)
        addi ra, ra, 4
        jr ra
        nop
      }
    }
------------------------------- Allocating code --------------------------------

Section: .text [pa=0x0000000000002000, va=0x0000000000002000]

Directive: .org 0x380
0x0000000000002380 (PA): mfc0 $31, $14 (0x401F7000)
0x0000000000002384 (PA): addi $31, $31, 0x4 (0x23FF0004)
0x0000000000002388 (PA): jr $31 (0x03E00008)
0x000000000000238c (PA): nop (0x00000000)

Возможно стоит убрать это влияние, и записывать exception_handler, например, так:

    exception_handler(:pa => 0x0000_0000, :va => 0x0000_0000) {
      entry_point(:org => 0x380, :exception => ['IntegerOverflow', 'SystemCall', 'Breakpoint']) {
        trace 'Exception handler (EPC = 0x%x)', location('COP0_R', 14)
        mfc0 ra, rcop0(14)
        addi ra, ra, 4
        jr ra
        nop
      }
    }


Files

bubble_sort.rb (2.75 KB) bubble_sort.rb Alexander Protsenko, 01/24/2020 05:15 PM
minimips_base.rb (13.2 KB) minimips_base.rb Alexander Protsenko, 01/24/2020 05:15 PM
Actions #1

Updated by Alexander Protsenko over 1 year ago

  • Target version changed from 2.5 to 2.6
Actions

Also available in: Atom PDF