# start: Perform the posixCallMainAndExit\(\) call with jalr on mips\. · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/e33af8e9021199696e413057b57fb86e750a9de0)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: e33af8e9021199696e413057b57fb86e750a9de0

Requested commit: e33af8e9021199696e413057b57fb86e750a9de0

Commit: e33af8e9021199696e413057b57fb86e750a9de0

Tree: 264476aa162eabd04ba072586c5fee40c88b19c3

Author: Alex Rønne Petersen

Committer: Alex Rønne Petersen

## Message

```
start: Perform the posixCallMainAndExit() call with jalr on mips.

It's actually important for the ABI that r25 (t9) contains the address of the
called function, so that this standard prologue sequence works:

    lui $2, %hi(_gp_disp)
    addiu $2, $2, %lo(_gp_disp)
    addu $gp, $2, $t9

(This is a bit similar to the ToC situation on powerpc that was fixed in
7bc78967b400322a0fc5651f37a1b0428c37fb9d.)

```

## Parents

- [77fc3b88fbdf805e0c2c1fc2647513cee56813a4](https://git.cafe/gitcafe/zig/commit/77fc3b88fbdf805e0c2c1fc2647513cee56813a4?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/e33af8e9021199696e413057b57fb86e750a9de0?format=markdown)
