Differences From Artifact [48cdec849d]:
- File
src/runtime/lookup-asm/lookup-asm-mips-elf.S
— part of check-in
[a2d93fd632]
at
2013-12-15 17:22:19
on branch trunk
— lookup-asm-mips.S: Use __MIPSE[LB]__.
These seem to be more reliable than _MIPSE[LB]. (user: js, size: 2447) [annotate] [blame] [check-ins using]
To Artifact [45689ef5fd]:
- File
src/runtime/lookup-asm/lookup-asm-mips-elf.S
— part of check-in
[0c332aa2d2]
at
2013-12-27 02:07:14
on branch trunk
— Rework forwarding API and ABI.
It matches the Apple API and ABI now and the forwarding handler itself
determines whether it should forward or not.This moves handling of +[resolve{Class,Instance}Method:] to the runtime
and allows adding new kinds of forwarding without changing the runtime.Also fixes a potential stack problem in the forwarding for MIPS. (user: js, size: 2421) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
18 19 20 21 22 23 24 | .globl objc_msg_lookup .globl objc_msg_lookup_stret .globl objc_msg_lookup_super .globl objc_msg_lookup_super_stret .section .text | | | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | .globl objc_msg_lookup .globl objc_msg_lookup_stret .globl objc_msg_lookup_super .globl objc_msg_lookup_super_stret .section .text .macro generate_lookup name not_found \name: beqz $a0, .ret_nil_\name lw $t0, 0($a0) lw $t0, 32($t0) .main_\name: |
︙ | ︙ | |||
60 61 62 63 64 65 66 | lw $t0, 0($t0) addu $t0, $t0, $t3 lw $t0, 0($t0) #ifdef __PIC__ beqz $t0, .forward_\name #else | | | | 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | lw $t0, 0($t0) addu $t0, $t0, $t3 lw $t0, 0($t0) #ifdef __PIC__ beqz $t0, .forward_\name #else beqz $t0, \not_found #endif move $v0, $t0 j $ra .ret_nil_\name: #ifdef __PIC__ addiu $v0, $t9, nil_method-\name #else la $v0, nil_method #endif j $ra #ifdef __PIC__ .forward_\name: lui $gp, %hi(_gp_disp) addiu $gp, $gp, %lo(_gp_disp) addu $gp, $gp, $t9 addiu $gp, $gp, .forward_\name-\name lw $t9, %call16(\not_found)($gp) jr $t9 #endif .type \name, %function .size \name, .-\name .endm .macro generate_lookup_super name lookup |
︙ | ︙ | |||
109 110 111 112 113 114 115 | la $v0, nil_method #endif j $ra .type \name, %function .size \name, .-\name .endm | | | | 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | la $v0, nil_method #endif j $ra .type \name, %function .size \name, .-\name .endm generate_lookup objc_msg_lookup objc_method_not_found generate_lookup objc_msg_lookup_stret objc_method_not_found_stret generate_lookup_super objc_msg_lookup_super objc_msg_lookup generate_lookup_super objc_msg_lookup_super_stret objc_msg_lookup_stret nil_method: move $v0, $zero j $ra #ifdef __linux__ .section .note.GNU-stack, "", %progbits #endif |