Questions tagged [frame-pointer]
7 questions
                    
                    4
                    
            votes
                
                0 answers
            
        gdb use of the frame pointer register in Aarch64 assembly?
I've run into a surprise while using the gdb debugger to trace execution of an Aarch64 assembly-language program.
A lot of documentation equates the x29 "architectural register" with the frame pointer,as "fp".  But gdb seems to set fp equal to the…
         
    
    
        Bloomu Prof
        
- 41
- 2
                    1
                    
            vote
                
                1 answer
            
        Storing and Loading $ra
I'm currently having trouble writing this recursive factorial assembly code in MIPS. I do not want to change the format of this code, as it is for a project, but I want to understand how to store or call $ra so that it will return to "branch:" in…
         
    
    
        kaili
        
- 13
- 3
                    1
                    
            vote
                
                1 answer
            
        Why does the stack pointer and frame pointer have the same address?
I was under the impression that the frame pointer $fp is set to the first word of stack according to Computer Organization and Design MIPS 5th ed page  103.
int func(int g) {
    int f = 9;
    return g+f;
}
mips gcc 12.2.0  generated assembly…
         
    
    
        African_king
        
- 177
- 1
- 8
                    0
                    
            votes
                
                0 answers
            
        How to build these run-time environments?
I`m troubling with constructing the runtime environment of using temporaries, local variables, parameters, locations reserved for return values, and return addresses, as well as the base pointer(bp), frame pointer(fp), and the stack…
         
    
    
        Damika
        
- 622
- 2
- 8
- 17
                    0
                    
            votes
                
                0 answers
            
        Passing arguments into an Assebly function
I'm trying to pass some arguments into a function but it doesn't get them correctly. I want to multiply some matrices and I want to pass: address of matrix 1, address of matrix 2, address of the matrix i want the result to be in, and the size of the…
         
    
    
        Iustin
        
- 70
- 5
                    0
                    
            votes
                
                1 answer
            
        Is there a way to use popa/pusha without SP? (for procedures with BP)
for example:
var1 dw 8
var2 dw 1
res dw ?
CODESEG
proc plus
pusha
mov bp,sp
    mov ax, [bp+6];var1
    mov bx, [bp+4];var2
    add ax, bx
    mov [res], ax
    
popa
ret 4
endp plus
start :
    mov ax, @data
    mov ds, ax
    
    push…
         
    
    
        maya
        
- 51
- 2
                    -1
                    
            votes
                
                1 answer
            
        What it means that Ebp register points to the old Ebp
i've been learning x86 assembly for reverse engineering recently and in my tutorial there is sentence that says Ebp points to the old Ebp, however i don't understand this, its confusing.
I looked up on other posts about it but no one did answer my…
         
    
    
        fre
        
- 11
- 5