summaryrefslogtreecommitdiff
path: root/arch/mn10300/kernel/fpu-nofpu-low.S
blob: 7ea087a549f4562482d8ae3667fc9e9727d2d2b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* MN10300 Low level FPU management operations
 *
 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells (dhowells@redhat.com)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public Licence
 * as published by the Free Software Foundation; either version
 * 2 of the Licence, or (at your option) any later version.
 */
#include <linux/linkage.h>
#include <asm/cpu-regs.h>
#include <asm/smp.h>
#include <asm/thread_info.h>
#include <asm/asm-offsets.h>
#include <asm/frame.inc>

###############################################################################
#
# void fpu_disabled(void)
# - handle an exception due to the FPU being disabled
#   when CONFIG_FPU is disabled
#
###############################################################################
	.type	fpu_disabled,@function
	.globl	fpu_disabled
fpu_disabled:
	add	-4,sp
	SAVE_ALL
	mov	-1,d0
	mov	d0,(REG_ORIG_D0,fp)

	and	~EPSW_NMID,epsw

	mov	fp,d0
	call	unexpected_fpu_exception[],0
	jmp	ret_from_exception

	.size	fpu_disabled,.-fpu_disabled