multi.isa (4528:f0b19ee67a7b) multi.isa (4535:51bf0993137e)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 The Hewlett-Packard Development Company
4// All rights reserved.
5//
6// Redistribution and use of this software in source and binary forms,
7// with or without modification, are permitted provided that the
8// following conditions are met:

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

50// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
51// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
52// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
53// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
54// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55//
56// Authors: Gabe Black
57
1// -*- mode:c++ -*-
2
3// Copyright (c) 2007 The Hewlett-Packard Development Company
4// All rights reserved.
5//
6// Redistribution and use of this software in source and binary forms,
7// with or without modification, are permitted provided that the
8// following conditions are met:

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

50// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
51// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
52// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
53// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
54// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
55//
56// Authors: Gabe Black
57
58////////////////////////////////////////////////////////////////////
58//////////////////////////////////////////////////////////////////////////
59//
59//
60// Instructions that do the same thing to multiple sets of arguments.
60// Instructions operate on one or multiple types of sets of arguments.
61//
61//
62//////////////////////////////////////////////////////////////////////////
62
63def format Inst(*opTypeSet) {{
64 decode_block = specializeInst(Name, list(opTypeSet), EmulEnv())
65}};
66
67def format MultiInst(switchVal, *opTypeSets) {{
68 switcher = {}
69 for (count, opTypeSet) in zip(xrange(len(opTypeSets)), opTypeSets):
70 switcher[count] = (opTypeSet, EmulEnv())
71 decode_block = doSplitDecode(Name, specializeInst, switchVal, switcher)
72}};
63
64def format Inst(*opTypeSet) {{
65 decode_block = specializeInst(Name, list(opTypeSet), EmulEnv())
66}};
67
68def format MultiInst(switchVal, *opTypeSets) {{
69 switcher = {}
70 for (count, opTypeSet) in zip(xrange(len(opTypeSets)), opTypeSets):
71 switcher[count] = (opTypeSet, EmulEnv())
72 decode_block = doSplitDecode(Name, specializeInst, switchVal, switcher)
73}};