mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-05 21:32:55 +00:00
Don't write to the PC with logical operations.
This commit is contained in:
parent
871c5467d7
commit
ed586e80bc
@ -183,7 +183,7 @@ struct Executor {
|
||||
// this case to update those PSR flags which are not protected by virtue of the
|
||||
// processor mode."
|
||||
|
||||
if(fields.destination() == 15) {
|
||||
if(fields.destination() == 15 && !is_logical(flags.operation())) {
|
||||
if constexpr (is_comparison(flags.operation())) {
|
||||
registers_.set_status(pc_proxy);
|
||||
} else {
|
||||
@ -201,7 +201,7 @@ struct Executor {
|
||||
}
|
||||
} else {
|
||||
// "If the S flag is clear when Rd is R15, only the 24 PC bits of R15 will be written."
|
||||
if(fields.destination() == 15) {
|
||||
if(fields.destination() == 15 && !is_logical(flags.operation())) {
|
||||
registers_.set_pc(pc_proxy);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user