arch/m68k/math-emu/fp_cond.S

Source file repositories/reference/linux-study-clean/arch/m68k/math-emu/fp_cond.S

File Facts

System
Linux kernel
Corpus path
arch/m68k/math-emu/fp_cond.S
Extension
.S
Size
5656 bytes
Lines
335
Domain
Architecture Layer
Bucket
arch/m68k
Inferred role
Architecture Layer: arch/m68k
Status
atlas-only

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

#include "fp_emu.h"
#include "fp_decode.h"

	.globl	fp_fscc, fp_fbccw, fp_fbccl

#ifdef FPU_EMU_DEBUG
fp_fnop:
	printf	PDECODE,"fnop\n"
	jra	fp_end
#else
#define fp_fnop fp_end
#endif

fp_fbccw:
	tst.w	%d2
	jeq	fp_fnop
	printf	PDECODE,"fbccw "
	fp_get_pc %a0
	lea	(-2,%a0,%d2.w),%a0
	jra	1f

fp_fbccl:
	printf	PDECODE,"fbccl "
	fp_get_pc %a0
	move.l	%d2,%d0
	swap	%d0
	fp_get_instr_word %d0,fp_err_ua1
	lea	(-2,%a0,%d0.l),%a0
1:	printf	PDECODE,"%x",1,%a0
	move.l	%d2,%d0
	swap	%d0
	jsr	fp_compute_cond
	tst.l	%d0
	jeq	1f
	fp_put_pc %a0,1
1:	printf	PDECODE,"\n"
	jra	fp_end

fp_fdbcc:
	printf	PDECODE,"fdbcc "
	fp_get_pc %a1				| calculate new pc
	fp_get_instr_word %d0,fp_err_ua1
	add.w	%d0,%a1
	fp_decode_addr_reg
	printf	PDECODE,"d%d,%x\n",2,%d0,%a1
	swap	%d1				| test condition in %d1
	tst.w	%d1
	jne	2f
	move.l	%d0,%d1
	jsr	fp_get_data_reg
	subq.w	#1,%d0
	jcs	1f
	fp_put_pc %a1,1
1:	jsr	fp_put_data_reg
2:	jra	fp_end

| set flags for decode macros for fs<cc>
do_fscc=1
do_no_pc_mode=1

fp_fscc:
	printf	PDECODE,"fscc "
	move.l	%d2,%d0
	jsr	fp_compute_cond
	move.w	%d0,%d1
	swap	%d1

	| decode addressing mode
	fp_decode_addr_mode

Annotation

Implementation Notes