SConscript (10458:64809024b924) | SConscript (10467:dcf27c8220ac) |
---|---|
1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 365 unchanged lines hidden (view full) --- 374 375 code = code_formatter() 376 code('''\ 377#ifndef __CONFIG_THE_ISA_HH__ 378#define __CONFIG_THE_ISA_HH__ 379 380''') 381 | 1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 365 unchanged lines hidden (view full) --- 374 375 code = code_formatter() 376 code('''\ 377#ifndef __CONFIG_THE_ISA_HH__ 378#define __CONFIG_THE_ISA_HH__ 379 380''') 381 |
382 # create defines for the preprocessing and compile-time determination |
|
382 for i,isa in enumerate(isas): 383 code('#define $0 $1', define(isa), i + 1) | 383 for i,isa in enumerate(isas): 384 code('#define $0 $1', define(isa), i + 1) |
385 code() |
|
384 | 386 |
387 # create an enum for any run-time determination of the ISA, we 388 # reuse the same name as the namespaces 389 code('enum class Arch {') 390 for i,isa in enumerate(isas): 391 if i + 1 == len(isas): 392 code(' $0 = $1', namespace(isa), define(isa)) 393 else: 394 code(' $0 = $1,', namespace(isa), define(isa)) 395 code('};') 396 |
|
385 code(''' 386 387#define THE_ISA ${{define(target_isa)}} 388#define TheISA ${{namespace(target_isa)}} 389#define THE_ISA_STR "${{target_isa}}" 390 391#endif // __CONFIG_THE_ISA_HH__''') 392 --- 874 unchanged lines hidden --- | 397 code(''' 398 399#define THE_ISA ${{define(target_isa)}} 400#define TheISA ${{namespace(target_isa)}} 401#define THE_ISA_STR "${{target_isa}}" 402 403#endif // __CONFIG_THE_ISA_HH__''') 404 --- 874 unchanged lines hidden --- |