Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8a0b1120 authored by Christophe Leroy's avatar Christophe Leroy Committed by Michael Ellerman
Browse files

powerpc/mm: Use instruction symbolic names in store_updates_sp()



Use symbolic names defined in asm/ppc-opcode.h
instead of hardcoded values.

Signed-off-by: default avatarChristophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 43d2974b
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -162,6 +162,7 @@
/* VMX Vector Store Instructions */
/* VMX Vector Store Instructions */
#define OP_31_XOP_STVX          231
#define OP_31_XOP_STVX          231


#define OP_31   31
#define OP_LWZ  32
#define OP_LWZ  32
#define OP_STFS 52
#define OP_STFS 52
#define OP_STFSU 53
#define OP_STFSU 53
+13 −13
Original line number Original line Diff line number Diff line
@@ -80,23 +80,23 @@ static bool store_updates_sp(struct pt_regs *regs)
		return false;
		return false;
	/* check major opcode */
	/* check major opcode */
	switch (inst >> 26) {
	switch (inst >> 26) {
	case 37:	/* stwu */
	case OP_STWU:
	case 39:	/* stbu */
	case OP_STBU:
	case 45:	/* sthu */
	case OP_STHU:
	case 53:	/* stfsu */
	case OP_STFSU:
	case 55:	/* stfdu */
	case OP_STFDU:
		return true;
		return true;
	case 62:	/* std or stdu */
	case OP_STD:	/* std or stdu */
		return (inst & 3) == 1;
		return (inst & 3) == 1;
	case 31:
	case OP_31:
		/* check minor opcode */
		/* check minor opcode */
		switch ((inst >> 1) & 0x3ff) {
		switch ((inst >> 1) & 0x3ff) {
		case 181:	/* stdux */
		case OP_31_XOP_STDUX:
		case 183:	/* stwux */
		case OP_31_XOP_STWUX:
		case 247:	/* stbux */
		case OP_31_XOP_STBUX:
		case 439:	/* sthux */
		case OP_31_XOP_STHUX:
		case 695:	/* stfsux */
		case OP_31_XOP_STFSUX:
		case 759:	/* stfdux */
		case OP_31_XOP_STFDUX:
			return true;
			return true;
		}
		}
	}
	}