1/* $FreeBSD: head/sys/powerpc/aim/trap_subr64.S 275268 2014-11-29 20:54:33Z jhibbits $ */ |
2/* $NetBSD: trap_subr.S,v 1.20 2002/04/22 23:20:08 kleink Exp $ */ 3 4/*- 5 * Copyright (C) 1995, 1996 Wolfgang Solfrank. 6 * Copyright (C) 1995, 1996 TooLs GmbH. 7 * All rights reserved. 8 * 9 * Redistribution and use in source and binary forms, with or without --- 784 unchanged lines hidden (view full) --- 794 */ 795 .globl CNAME(dblow),CNAME(dbsize) 796CNAME(dblow): 797 mtsprg1 %r1 /* save SP */ 798 mtsprg2 %r29 /* save r29 */ 799 mfcr %r29 /* save CR in r29 */ 800 mfsrr1 %r1 801 mtcr %r1 |
802 bf 17,1f /* branch if privileged */ |
803 |
804 /* Unprivileged case */ 805 mtcr %r29 /* put the condition register back */ 806 mfsprg2 %r29 /* ... and r29 */ 807 mflr %r1 /* save LR */ 808 mtsprg2 %r1 /* And then in SPRG2 */ 809 li %r1, 0 /* How to get the vector from LR */ 810 811 bla generictrap /* and we look like a generic trap */ |
8121: |
813 GET_CPUINFO(%r1) 814 std %r27,(PC_DBSAVE+CPUSAVE_R27)(%r1) /* free r27 */ 815 std %r28,(PC_DBSAVE+CPUSAVE_R28)(%r1) /* free r28 */ 816 mfsprg2 %r28 /* r29 holds cr... */ 817 std %r28,(PC_DBSAVE+CPUSAVE_R29)(%r1) /* free r29 */ 818 std %r30,(PC_DBSAVE+CPUSAVE_R30)(%r1) /* free r30 */ 819 std %r31,(PC_DBSAVE+CPUSAVE_R31)(%r1) /* free r31 */ 820 mflr %r28 /* save LR */ 821 bla dbtrap 822CNAME(dbsize) = .-CNAME(dblow) 823#endif /* KDB */ |