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

Subversion Repositories ao486

[/] [ao486/] [trunk/] [rtl/] [ao486/] [commands/] [CMD_LAHF_CBW_CWD.txt] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 alfik
 
2
3
`define CMD_LAHF        #AUTOGEN_NEXT_CMD
4
`define CMD_CBW         #AUTOGEN_NEXT_CMD
5
`define CMD_CWD         #AUTOGEN_NEXT_CMD
6
7
 
8
9
dec_ready_one && decoder[7:0] == 8'h9F
10
`CMD_LAHF
11
SET(consume_one);
12
13
 
14
15
dec_ready_one && decoder[7:0] == 8'h98
16
`CMD_CBW
17
SET(consume_one);
18
19
 
20
21
dec_ready_one && decoder[7:0] == 8'h99
22
`CMD_CWD
23
SET(consume_one);
24
25
 
26
27
IF(rd_cmd == `CMD_LAHF || rd_cmd == `CMD_CBW || rd_cmd == `CMD_CWD);
28
 
29
    SET(rd_req_eax, rd_cmd != `CMD_CWD);
30
    SET(rd_req_edx, rd_cmd == `CMD_CWD);
31
ENDIF();
32
33
 
34
35
IF(wr_cmd == `CMD_LAHF);
36
    SAVE(eax, { eax[31:16], sflag, zflag, 1'b0, aflag, 1'b0, pflag, 1'b1, cflag, eax[7:0] });
37
ENDIF();
38
39
 
40
41
IF(wr_cmd == `CMD_CBW);
42
    IF(wr_operand_32bit);   SAVE(eax, { {16{eax[15]}}, eax[15:0] });
43
    ELSE();                 SAVE(eax, { eax[31:16], {8{eax[7]}}, eax[7:0] });
44
    ENDIF();
45
ENDIF();
46
47
 
48
49
IF(wr_cmd == `CMD_CWD);
50
    IF(wr_operand_32bit);   SAVE(edx, {32{eax[31]}});
51
    ELSE();                 SAVE(edx, { edx[31:16], {16{eax[15]}} });
52
    ENDIF();
53
ENDIF();
54

powered by: WebSVN 2.1.0

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