/*1* "Indirect" DCR access2*3* Copyright (c) 2004 Eugene Surovegin <[email protected]>4*5* This program is free software; you can redistribute it and/or modify it6* under the terms of the GNU General Public License as published by the7* Free Software Foundation; either version 2 of the License, or (at your8* option) any later version.9*/1011#include <asm/ppc_asm.h>12#include <asm/processor.h>13#include <asm/bug.h>1415#define DCR_ACCESS_PROLOG(table) \16cmpli cr0,r3,1024; \17rlwinm r3,r3,4,18,27; \18lis r5,table@h; \19ori r5,r5,table@l; \20add r3,r3,r5; \21bge- 1f; \22mtctr r3; \23bctr; \241: trap; \25EMIT_BUG_ENTRY 1b,__FILE__,__LINE__,0; \26blr2728_GLOBAL(__mfdcr)29DCR_ACCESS_PROLOG(__mfdcr_table)3031_GLOBAL(__mtdcr)32DCR_ACCESS_PROLOG(__mtdcr_table)3334__mfdcr_table:35mfdcr r3,0; blr36__mtdcr_table:37mtdcr 0,r4; blr3839dcr = 140.rept 102341mfdcr r3,dcr; blr42mtdcr dcr,r4; blr43dcr = dcr + 144.endr454647