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////////////////////////////////////////////////////////////////////////// |
59// |
60// Instructions operate on one or multiple types of sets of arguments. |
61// |
62////////////////////////////////////////////////////////////////////////// |
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}}; |