diff options
author | Miodrag Milanović <mmicko@gmail.com> | 2020-06-18 12:44:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-18 12:44:21 +0200 |
commit | 2123019ac6da12fa116955ee397183363a6e5eaf (patch) | |
tree | e523c5428ab51e9dc2b8f54f2fe5587670c28968 | |
parent | c4f20f744be57d4628400368d5fce040a9dbf269 (diff) | |
parent | 60fb9cabcfad985a4f35acaa74fd6e63b45081bc (diff) | |
download | yosys-2123019ac6da12fa116955ee397183363a6e5eaf.tar.gz yosys-2123019ac6da12fa116955ee397183363a6e5eaf.tar.bz2 yosys-2123019ac6da12fa116955ee397183363a6e5eaf.zip |
Merge pull request #2164 from madebr/msvc
Get yosys building on Visual Studio
-rw-r--r-- | frontends/verilog/preproc.cc | 2 | ||||
-rw-r--r-- | frontends/verilog/verilog_parser.y | 2 | ||||
-rw-r--r-- | kernel/yosys.h | 8 | ||||
-rw-r--r-- | passes/techmap/extract_counter.cc | 10 |
4 files changed, 11 insertions, 11 deletions
diff --git a/frontends/verilog/preproc.cc b/frontends/verilog/preproc.cc index 7905ea598..ea23139e2 100644 --- a/frontends/verilog/preproc.cc +++ b/frontends/verilog/preproc.cc @@ -591,7 +591,7 @@ read_define_args() default: // The only FSM states are 0-2 and we dealt with 2 at the start of the loop. - __builtin_unreachable(); + log_assert(false); } } diff --git a/frontends/verilog/verilog_parser.y b/frontends/verilog/verilog_parser.y index b34a62248..15c231f3b 100644 --- a/frontends/verilog/verilog_parser.y +++ b/frontends/verilog/verilog_parser.y @@ -1481,7 +1481,7 @@ enum_name_decl: delete $1; SET_AST_NODE_LOC(node, @1, @1); delete node->children[0]; - node->children[0] = $2 ?: new AstNode(AST_NONE); + node->children[0] = $2 ? $2 : new AstNode(AST_NONE); astbuf2->children.push_back(node); } ; diff --git a/kernel/yosys.h b/kernel/yosys.h index c922faf26..4fca39228 100644 --- a/kernel/yosys.h +++ b/kernel/yosys.h @@ -117,11 +117,11 @@ extern Tcl_Obj *Tcl_ObjSetVar2(Tcl_Interp *interp, Tcl_Obj *part1Ptr, Tcl_Obj *p # define PATH_MAX MAX_PATH # define isatty _isatty # define fileno _fileno -# else -// mingw includes `wingdi.h` which defines a TRANSPARENT macro -// that conflicts with X(TRANSPARENT) entry in kernel/constids.inc -# undef TRANSPARENT # endif + +// mingw and msvc include `wingdi.h` which defines a TRANSPARENT macro +// that conflicts with X(TRANSPARENT) entry in kernel/constids.inc +# undef TRANSPARENT #endif #ifndef PATH_MAX diff --git a/passes/techmap/extract_counter.cc b/passes/techmap/extract_counter.cc index 68b338143..77a4bc0b6 100644 --- a/passes/techmap/extract_counter.cc +++ b/passes/techmap/extract_counter.cc @@ -795,11 +795,11 @@ struct ExtractCounterPass : public Pass { pool<RTLIL::IdString> _parallel_cells; CounterExtractionSettings settings { - .parallel_cells = _parallel_cells, - .maxwidth = 64, - .minwidth = 2, - .allow_arst = true, - .allowed_dirs = 0, + _parallel_cells, // parallel_cells + 64, // maxwidth + 2, // minwidth + true, // allow_arst + 0, // allowed_dirs }; size_t argidx; |