std r3,STK_PARM(r4)(r1)
/* Get htab_hash_mask */
- ld r4,htab_data@got(2)
- ld r27,16(r4) /* htab_data.htab_hash_mask -> r27 */
+ ld r4,htab_hash_mask@got(2)
+ ld r27,0(r4) /* htab_hash_mask -> r27 */
/* Check if we may already be in the hashtable, in this case, we
* go to out-of-line code to try to modify the HPTE
li r9,0
_GLOBAL(htab_call_hpte_insert1)
bl . /* Will be patched by htab_finish_init() */
- cmpi 0,r3,0
+ cmpdi 0,r3,0
bge htab_pte_insert_ok /* Insertion successful */
- cmpi 0,r3,-2 /* Critical failure */
+ cmpdi 0,r3,-2 /* Critical failure */
beq- htab_pte_insert_failure
/* Now try secondary slot */
li r9,0
_GLOBAL(htab_call_hpte_insert2)
bl . /* Will be patched by htab_finish_init() */
- cmpi 0,r3,0
+ cmpdi 0,r3,0
bge+ htab_pte_insert_ok /* Insertion successful */
- cmpi 0,r3,-2 /* Critical failure */
+ cmpdi 0,r3,-2 /* Critical failure */
beq- htab_pte_insert_failure
/* Both are full, we need to evict something */
/* if we failed because typically the HPTE wasn't really here
* we try an insertion.
*/
- cmpi 0,r3,-1
+ cmpdi 0,r3,-1
beq- htab_insert_pte
/* Clear the BUSY bit and Write out the PTE */
b bail
htab_pte_insert_failure:
- b .htab_insert_failure
+ /* Bail out restoring old PTE */
+ ld r6,STK_PARM(r6)(r1)
+ std r31,0(r6)
+ li r3,-1
+ b bail