Deleted Added
sdiff udiff text old ( 12849:7f43ad13ebf0 ) new ( 13548:b76f99d052bb )
full compact
1// -*- mode:c++ -*-
2
3// Copyright (c) 2015 RISC-V Foundation
4// Copyright (c) 2016-2017 The University of Virginia
5// All rights reserved.
6//
7// Redistribution and use in source and binary forms, with or without
8// modification, are permitted provided that the following conditions are

--- 242 unchanged lines hidden (view full) ---

251 if (data != olddata) {
252 if (bits(csr, 11, 10) == 0x3) {
253 std::string error = csprintf("CSR %s is read-only\n",
254 CSRData.at(csr).name);
255 fault = make_shared<IllegalInstFault>(error, machInst);
256 } else {
257 DPRINTF(RiscvMisc, "Writing %#x to CSR %s.\n", data,
258 CSRData.at(csr).name);
259 switch (csr) {
260 case CSR_FCSR:
261 xc->setMiscReg(MISCREG_FFLAGS, bits(data, 4, 0));
262 xc->setMiscReg(MISCREG_FRM, bits(data, 7, 5));
263 break;
264 default:
265 xc->setMiscReg(CSRData.at(csr).physIndex, data);
266 break;
267 }
268 }
269 }
270 }
271 if (fault == NoFault) {

--- 100 unchanged lines hidden ---