OpenCores
URL https://opencores.org/ocsvn/ao486/ao486/trunk

Subversion Repositories ao486

[/] [ao486/] [trunk/] [rtl/] [ao486/] [commands/] [CMD_CLC_CMC_CLD_STC_STD_SAHF.txt] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
 
2
3
`define CMD_CLC     #AUTOGEN_NEXT_CMD
4
`define CMD_CLD     #AUTOGEN_NEXT_CMD
5
`define CMD_CMC     #AUTOGEN_NEXT_CMD
6
`define CMD_STC     #AUTOGEN_NEXT_CMD
7
`define CMD_STD     #AUTOGEN_NEXT_CMD
8
`define CMD_SAHF    #AUTOGEN_NEXT_CMD
9
10
 
11
 
12
13
dec_ready_one && decoder[7:0] == 8'hF8
14
`CMD_CLC
15
SET(consume_one);
16
17
 
18
19
dec_ready_one && decoder[7:0] == 8'hFC
20
`CMD_CLD
21
SET(consume_one);
22
23
 
24
25
dec_ready_one && decoder[7:0] == 8'hF5
26
`CMD_CMC
27
SET(consume_one);
28
29
 
30
31
dec_ready_one && decoder[7:0] == 8'hF9
32
`CMD_STC
33
SET(consume_one);
34
35
 
36
37
dec_ready_one && decoder[7:0] == 8'hFD
38
`CMD_STD
39
SET(consume_one);
40
41
 
42
43
dec_ready_one && decoder[7:0] == 8'h9E
44
`CMD_SAHF
45
SET(consume_one);
46
47
 
48
49
IF(rd_cmd == `CMD_CLC || rd_cmd == `CMD_CMC || rd_cmd == `CMD_CLD || rd_cmd == `CMD_STC || rd_cmd == `CMD_STD || rd_cmd == `CMD_SAHF);
50
 
51
    SET(rd_req_eflags);
52
ENDIF();
53
54
 
55
//NOTE: CMC does not wait on exe_mutex_current[`MUTEX_EFLAGS_BIT], because read in wr cycle
56
//NOTE: SAHF does not wait for eax, because read in wr cycle
57
 
58
59
IF(wr_cmd == `CMD_CLC); SAVE(cflag, `FALSE); ENDIF();
60
61
 
62
63
IF(wr_cmd == `CMD_CMC); SAVE(cflag, ~cflag); ENDIF();
64
65
 
66
67
IF(wr_cmd == `CMD_CLD); SAVE(dflag, `FALSE); ENDIF();
68
69
 
70
71
IF(wr_cmd == `CMD_STC); SAVE(cflag, `TRUE); ENDIF();
72
73
 
74
75
IF(wr_cmd == `CMD_STD); SAVE(dflag, `TRUE); ENDIF();
76
77
 
78
79
IF(wr_cmd == `CMD_SAHF);
80
    SAVE(sflag, eax[15]);
81
    SAVE(zflag, eax[14]);
82
    SAVE(aflag, eax[12]);
83
    SAVE(cflag, eax[8]);
84
    SAVE(pflag, eax[10]);
85
ENDIF();
86

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.