mem.isa (8304:16911ff780d3) mem.isa (8588:ef28ed90449d)
1// -*- mode:c++ -*-
2
3// Copyright (c) 2010 ARM Limited
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating

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

175
176 return Name
177
178 def buildMemSuffix(sign, size):
179 if size == 4:
180 memSuffix = ''
181 elif size == 2:
182 if sign:
1// -*- mode:c++ -*-
2
3// Copyright (c) 2010 ARM Limited
4// All rights reserved
5//
6// The license below extends only to copyright in the software and shall
7// not be construed as granting a license to any other intellectual
8// property including but not limited to intellectual property relating

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

175
176 return Name
177
178 def buildMemSuffix(sign, size):
179 if size == 4:
180 memSuffix = ''
181 elif size == 2:
182 if sign:
183 memSuffix = '.sh'
183 memSuffix = '_sh'
184 else:
184 else:
185 memSuffix = '.uh'
185 memSuffix = '_uh'
186 elif size == 1:
187 if sign:
186 elif size == 1:
187 if sign:
188 memSuffix = '.sb'
188 memSuffix = '_sb'
189 else:
189 else:
190 memSuffix = '.ub'
190 memSuffix = '_ub'
191 else:
192 raise Exception, "Unrecognized size for access %d" % size
193
194 return memSuffix
195
196 def buildMemBase(base, post, writeback):
197 if post and writeback:
198 base = "MemoryPostIndex<%s>" % base
199 elif not post and writeback:
200 base = "MemoryPreIndex<%s>" % base
201 elif not post and not writeback:
202 base = "MemoryOffset<%s>" % base
203 else:
204 raise Exception, "Illegal combination of post and writeback"
205 return base
206}};
207
191 else:
192 raise Exception, "Unrecognized size for access %d" % size
193
194 return memSuffix
195
196 def buildMemBase(base, post, writeback):
197 if post and writeback:
198 base = "MemoryPostIndex<%s>" % base
199 elif not post and writeback:
200 base = "MemoryPreIndex<%s>" % base
201 elif not post and not writeback:
202 base = "MemoryOffset<%s>" % base
203 else:
204 raise Exception, "Illegal combination of post and writeback"
205 return base
206}};
207