# HG changeset patch # User Roland Schatz # Date 1395052076 -3600 # Node ID 883fbd3e06e0298ee3e58f005d9dfa78b4879833 # Parent fabf5447603e630461c73192ac23efd161c27263 Make size of PlatformKind overridable by VM specific code. diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CalleeSaveLayout.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CalleeSaveLayout.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CalleeSaveLayout.java Mon Mar 17 11:27:56 2014 +0100 @@ -71,7 +71,7 @@ * CSA * @param registers the registers that can be saved in the CSA */ - public CalleeSaveLayout(Architecture architecture, int frameOffsetToCSA, int size, int slotSize, Register... registers) { + public CalleeSaveLayout(TargetDescription target, int frameOffsetToCSA, int size, int slotSize, Register... registers) { this.frameOffsetToCSA = frameOffsetToCSA; assert slotSize == 0 || CodeUtil.isPowerOf2(slotSize); this.slotSize = slotSize; @@ -88,8 +88,8 @@ if (offset > maxOffset) { maxOffset = offset; } - PlatformKind kind = architecture.getLargestStorableKind(reg.getRegisterCategory()); - offset += architecture.getSizeInBytes(kind); + PlatformKind kind = target.arch.getLargestStorableKind(reg.getRegisterCategory()); + offset += target.getSizeInBytes(kind); } if (size == -1) { this.size = offset; @@ -106,8 +106,8 @@ int index = offset / slotSize; regNumToIndex[reg.number] = index; indexToReg[index] = reg; - PlatformKind kind = architecture.getLargestStorableKind(reg.getRegisterCategory()); - offset += architecture.getSizeInBytes(kind); + PlatformKind kind = target.arch.getLargestStorableKind(reg.getRegisterCategory()); + offset += target.getSizeInBytes(kind); } } diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CompilationResult.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CompilationResult.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/CompilationResult.java Mon Mar 17 11:27:56 2014 +0100 @@ -152,9 +152,9 @@ return alignment; } - public abstract int getSize(Architecture arch); + public abstract int getSize(TargetDescription target); - public abstract void emit(Architecture arch, ByteBuffer buffer); + public abstract void emit(TargetDescription target, ByteBuffer buffer); } public static final class ConstantData extends Data { @@ -167,48 +167,48 @@ } @Override - public int getSize(Architecture arch) { - return arch.getSizeInBytes(constant.getPlatformKind()); + public int getSize(TargetDescription target) { + return target.getSizeInBytes(constant.getPlatformKind()); } @Override - public void emit(Architecture arch, ByteBuffer buffer) { + public void emit(TargetDescription target, ByteBuffer buffer) { switch (constant.getKind()) { case Boolean: - assert getSize(arch) == 1; + assert getSize(target) == 1; buffer.put(constant.asBoolean() ? (byte) 1 : (byte) 0); break; case Byte: - assert getSize(arch) == 1; + assert getSize(target) == 1; buffer.put((byte) constant.asInt()); break; case Char: - assert getSize(arch) == 2; + assert getSize(target) == 2; buffer.putChar((char) constant.asInt()); break; case Short: - assert getSize(arch) == 2; + assert getSize(target) == 2; buffer.putShort((short) constant.asInt()); break; case Int: - assert getSize(arch) == 4; + assert getSize(target) == 4; buffer.putInt(constant.asInt()); break; case Long: - assert getSize(arch) == 8; + assert getSize(target) == 8; buffer.putLong(constant.asLong()); break; case Float: - assert getSize(arch) == 4; + assert getSize(target) == 4; buffer.putFloat(constant.asFloat()); break; case Double: - assert getSize(arch) == 8; + assert getSize(target) == 8; buffer.putDouble(constant.asDouble()); break; case Object: // placeholder for oop value - for (int i = 0; i < getSize(arch); i++) { + for (int i = 0; i < getSize(target); i++) { buffer.put((byte) 0); } break; @@ -231,12 +231,12 @@ } @Override - public int getSize(Architecture arch) { + public int getSize(TargetDescription target) { return data.length; } @Override - public void emit(Architecture arch, ByteBuffer buffer) { + public void emit(TargetDescription target, ByteBuffer buffer) { buffer.put(data); } diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/TargetDescription.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/TargetDescription.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/TargetDescription.java Mon Mar 17 11:27:56 2014 +0100 @@ -81,4 +81,8 @@ this.implicitNullCheckLimit = implicitNullCheckLimit; this.inlineObjects = inlineObjects; } + + public int getSizeInBytes(PlatformKind kind) { + return arch.getSizeInBytes(kind); + } } diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.asm.amd64/src/com/oracle/graal/asm/amd64/AMD64MacroAssembler.java --- a/graal/com.oracle.graal.asm.amd64/src/com/oracle/graal/asm/amd64/AMD64MacroAssembler.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.asm.amd64/src/com/oracle/graal/asm/amd64/AMD64MacroAssembler.java Mon Mar 17 11:27:56 2014 +0100 @@ -261,7 +261,7 @@ private AMD64Address trigPrologue(Register value) { assert value.getRegisterCategory() == AMD64.XMM; AMD64Address tmp = new AMD64Address(AMD64.rsp); - subq(AMD64.rsp, target.arch.getSizeInBytes(Kind.Double)); + subq(AMD64.rsp, target.getSizeInBytes(Kind.Double)); movdbl(tmp, value); fldd(tmp); return tmp; @@ -271,7 +271,7 @@ assert dest.getRegisterCategory() == AMD64.XMM; fstpd(tmp); movdbl(dest, tmp); - addq(AMD64.rsp, target.arch.getSizeInBytes(Kind.Double)); + addq(AMD64.rsp, target.getSizeInBytes(Kind.Double)); } /** diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRegisterConfig.java --- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRegisterConfig.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64HotSpotRegisterConfig.java Mon Mar 17 11:27:56 2014 +0100 @@ -211,7 +211,7 @@ if (locations[i] == null) { locations[i] = StackSlot.get(kind.getStackKind(), currentStackOffset, !type.out); - currentStackOffset += Math.max(target.arch.getSizeInBytes(kind), target.wordSize); + currentStackOffset += Math.max(target.getSizeInBytes(kind), target.wordSize); } } diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotRegisterConfig.java --- a/graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotRegisterConfig.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.hotspot.ptx/src/com/oracle/graal/hotspot/ptx/PTXHotSpotRegisterConfig.java Mon Mar 17 11:27:56 2014 +0100 @@ -133,7 +133,7 @@ if (locations[i] == null) { locations[i] = StackSlot.get(kind.getStackKind(), currentStackOffset, !type.out); - currentStackOffset += Math.max(target.arch.getSizeInBytes(kind), target.wordSize); + currentStackOffset += Math.max(target.getSizeInBytes(kind), target.wordSize); } } diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotCodeCacheProvider.java --- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotCodeCacheProvider.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotCodeCacheProvider.java Mon Mar 17 11:27:56 2014 +0100 @@ -34,6 +34,6 @@ @Override protected RegisterConfig createRegisterConfig() { - return new SPARCHotSpotRegisterConfig(getTarget().arch, runtime.getConfig()); + return new SPARCHotSpotRegisterConfig(getTarget(), runtime.getConfig()); } } diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotRegisterConfig.java --- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotRegisterConfig.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotRegisterConfig.java Mon Mar 17 11:27:56 2014 +0100 @@ -130,10 +130,10 @@ return registers; } - public SPARCHotSpotRegisterConfig(Architecture architecture, HotSpotVMConfig config) { - this.architecture = architecture; + public SPARCHotSpotRegisterConfig(TargetDescription target, HotSpotVMConfig config) { + this.architecture = target.arch; - csl = new CalleeSaveLayout(architecture, -1, -1, architecture.getWordSize(), calleeSaveRegisters); + csl = new CalleeSaveLayout(target, -1, -1, target.arch.getWordSize(), calleeSaveRegisters); allocatable = initAllocatable(config.useCompressedOops); attributesMap = RegisterAttributes.createMap(this, SPARC.allRegisters); } @@ -203,7 +203,7 @@ if (locations[i] == null) { locations[i] = StackSlot.get(kind.getStackKind(), currentStackOffset, !type.out); - currentStackOffset += Math.max(target.arch.getSizeInBytes(kind), target.wordSize); + currentStackOffset += Math.max(target.getSizeInBytes(kind), target.wordSize); } } diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/HotSpotCryptoSubstitutionTest.java --- a/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/HotSpotCryptoSubstitutionTest.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.hotspot.test/src/com/oracle/graal/hotspot/test/HotSpotCryptoSubstitutionTest.java Mon Mar 17 11:27:56 2014 +0100 @@ -49,7 +49,7 @@ protected InstalledCode addMethod(ResolvedJavaMethod method, CompilationResult compResult) { HotSpotResolvedJavaMethod hsMethod = (HotSpotResolvedJavaMethod) method; HotSpotNmethod installedCode = new HotSpotNmethod(hsMethod, compResult.getName(), true); - HotSpotCompiledNmethod compiledNmethod = new HotSpotCompiledNmethod(runtime().getTarget().arch, hsMethod, compResult); + HotSpotCompiledNmethod compiledNmethod = new HotSpotCompiledNmethod(runtime().getTarget(), hsMethod, compResult); CodeInstallResult result = runtime().getCompilerToVM().installCode(compiledNmethod, installedCode, null); Assert.assertEquals("Error installing method " + method + ": " + result, result, CodeInstallResult.OK); diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledCode.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledCode.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledCode.java Mon Mar 17 11:27:56 2014 +0100 @@ -77,12 +77,12 @@ } @Override - public int getSize(Architecture arch) { + public int getSize(TargetDescription target) { return 0; } @Override - public void emit(Architecture arch, ByteBuffer buffer) { + public void emit(TargetDescription target, ByteBuffer buffer) { } } @@ -106,7 +106,7 @@ */ public final HotSpotData[] patches; - public DataSection(Architecture arch, Site[] sites) { + public DataSection(TargetDescription target, Site[] sites) { int size = 0; int patchCount = 0; List externalDataList = new ArrayList<>(); @@ -118,7 +118,7 @@ if (dataPatch.externalData != null) { Data d = dataPatch.externalData; size = NumUtil.roundUp(size, d.getAlignment()); - size += d.getSize(arch); + size += d.getSize(target); externalDataList.add(dataPatch); if (dataPatch.getConstant() != null && dataPatch.getConstant().getKind() == Kind.Object) { patchCount++; @@ -150,8 +150,8 @@ } dataPatch.externalData = hsData; - index += d.getSize(arch); - d.emit(arch, buffer); + index += d.getSize(target); + d.emit(target, buffer); } this.sectionAlignment = alignment; @@ -169,10 +169,10 @@ } } - public HotSpotCompiledCode(Architecture arch, CompilationResult compResult) { + public HotSpotCompiledCode(TargetDescription target, CompilationResult compResult) { this.comp = compResult; sites = getSortedSites(compResult); - dataSection = new DataSection(arch, sites); + dataSection = new DataSection(target, sites); if (compResult.getExceptionHandlers().isEmpty()) { exceptionHandlers = null; } else { diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledNmethod.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledNmethod.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledNmethod.java Mon Mar 17 11:27:56 2014 +0100 @@ -35,8 +35,8 @@ public final int entryBCI; public final int id; - public HotSpotCompiledNmethod(Architecture arch, HotSpotResolvedJavaMethod method, CompilationResult compResult) { - super(arch, compResult); + public HotSpotCompiledNmethod(TargetDescription target, HotSpotResolvedJavaMethod method, CompilationResult compResult) { + super(target, compResult); this.method = method; this.entryBCI = compResult.getEntryBCI(); this.id = compResult.getId(); diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledRuntimeStub.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledRuntimeStub.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotCompiledRuntimeStub.java Mon Mar 17 11:27:56 2014 +0100 @@ -38,8 +38,8 @@ public final String stubName; - public HotSpotCompiledRuntimeStub(Architecture arch, Stub stub, CompilationResult compResult) { - super(arch, compResult); + public HotSpotCompiledRuntimeStub(TargetDescription target, Stub stub, CompilationResult compResult) { + super(target, compResult); assert checkStubInvariants(compResult); this.stubName = stub.toString(); } diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotCodeCacheProvider.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotCodeCacheProvider.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotCodeCacheProvider.java Mon Mar 17 11:27:56 2014 +0100 @@ -173,7 +173,7 @@ compResult.setId(method.allocateCompileId(compResult.getEntryBCI())); } HotSpotInstalledCode installedCode = new HotSpotNmethod(method, compResult.getName(), true); - runtime.getCompilerToVM().installCode(new HotSpotCompiledNmethod(target.arch, method, compResult), installedCode, method.getSpeculationLog()); + runtime.getCompilerToVM().installCode(new HotSpotCompiledNmethod(target, method, compResult), installedCode, method.getSpeculationLog()); return logOrDump(installedCode, compResult); } @@ -184,7 +184,7 @@ compResult.setId(hotspotMethod.allocateCompileId(compResult.getEntryBCI())); } HotSpotInstalledCode code = new HotSpotNmethod(hotspotMethod, compResult.getName(), false); - CodeInstallResult result = runtime.getCompilerToVM().installCode(new HotSpotCompiledNmethod(target.arch, hotspotMethod, compResult), code, log); + CodeInstallResult result = runtime.getCompilerToVM().installCode(new HotSpotCompiledNmethod(target, hotspotMethod, compResult), code, log); if (result != CodeInstallResult.OK) { return null; } @@ -203,7 +203,7 @@ compResult.setId(javaMethod.allocateCompileId(compResult.getEntryBCI())); } HotSpotNmethod code = new HotSpotNmethod(javaMethod, compResult.getName(), false, true); - HotSpotCompiledNmethod compiled = new HotSpotCompiledNmethod(target.arch, javaMethod, compResult); + HotSpotCompiledNmethod compiled = new HotSpotCompiledNmethod(target, javaMethod, compResult); CompilerToVM vm = runtime.getCompilerToVM(); CodeInstallResult result = vm.installCode(compiled, code, null); if (result != CodeInstallResult.OK) { diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotLoweringProvider.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotLoweringProvider.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotLoweringProvider.java Mon Mar 17 11:27:56 2014 +0100 @@ -700,9 +700,9 @@ public int getScalingFactor(Kind kind) { if (useCompressedOops() && kind == Kind.Object) { - return this.runtime.getTarget().arch.getSizeInBytes(Kind.Int); + return this.runtime.getTarget().getSizeInBytes(Kind.Int); } else { - return this.runtime.getTarget().arch.getSizeInBytes(kind); + return this.runtime.getTarget().getSizeInBytes(kind); } } diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotMetaAccessProvider.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotMetaAccessProvider.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotMetaAccessProvider.java Mon Mar 17 11:27:56 2014 +0100 @@ -299,7 +299,7 @@ ResolvedJavaType elementType = lookupJavaType.getComponentType(); Kind elementKind = elementType.getKind(); final int headerSize = HotSpotGraalRuntime.getArrayBaseOffset(elementKind); - int sizeOfElement = HotSpotGraalRuntime.runtime().getTarget().arch.getSizeInBytes(elementKind); + int sizeOfElement = HotSpotGraalRuntime.runtime().getTarget().getSizeInBytes(elementKind); int alignment = HotSpotGraalRuntime.runtime().getTarget().wordSize; int log2ElementSize = CodeUtil.log2(sizeOfElement); return NewObjectSnippets.computeArrayAllocationSize(length, alignment, headerSize, log2ElementSize); diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/Stub.java --- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/Stub.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/Stub.java Mon Mar 17 11:27:56 2014 +0100 @@ -153,7 +153,7 @@ try (Scope s = Debug.scope("CodeInstall")) { Stub stub = Stub.this; HotSpotRuntimeStub installedCode = new HotSpotRuntimeStub(stub); - HotSpotCompiledCode hsCompResult = new HotSpotCompiledRuntimeStub(backend.getTarget().arch, stub, compResult); + HotSpotCompiledCode hsCompResult = new HotSpotCompiledRuntimeStub(backend.getTarget(), stub, compResult); CodeInstallResult result = runtime().getCompilerToVM().installCode(hsCompResult, installedCode, null); if (result != CodeInstallResult.OK) { diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.hsail/src/com/oracle/graal/hsail/HSAILRegisterConfig.java --- a/graal/com.oracle.graal.hsail/src/com/oracle/graal/hsail/HSAILRegisterConfig.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.hsail/src/com/oracle/graal/hsail/HSAILRegisterConfig.java Mon Mar 17 11:27:56 2014 +0100 @@ -123,7 +123,7 @@ if (locations[i] == null) { locations[i] = StackSlot.get(kind.getStackKind(), currentStackOffset, !type.out); - currentStackOffset += Math.max(target.arch.getSizeInBytes(kind), target.wordSize); + currentStackOffset += Math.max(target.getSizeInBytes(kind), target.wordSize); } } diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java Mon Mar 17 11:27:56 2014 +0100 @@ -170,7 +170,7 @@ // Without this, frameNeedsAllocating() would never return true. int total = 0; for (StackSlot s : freedSlots) { - total += target.arch.getSizeInBytes(s.getKind()); + total += target.getSizeInBytes(s.getKind()); } if (total == spillSize - initialSpillSize) { // reset spill area size @@ -256,7 +256,7 @@ * @return the size in bytes */ protected int spillSlotSize(PlatformKind kind) { - return target.arch.getSizeInBytes(kind); + return target.getSizeInBytes(kind); } /** diff -r fabf5447603e -r 883fbd3e06e0 graal/com.oracle.graal.word/src/com/oracle/graal/word/nodes/WordCastNode.java --- a/graal/com.oracle.graal.word/src/com/oracle/graal/word/nodes/WordCastNode.java Mon Mar 17 11:21:32 2014 +0100 +++ b/graal/com.oracle.graal.word/src/com/oracle/graal/word/nodes/WordCastNode.java Mon Mar 17 11:27:56 2014 +0100 @@ -69,7 +69,7 @@ @Override public void generate(LIRGeneratorTool generator) { assert kind() != input.kind(); - assert generator.target().arch.getSizeInBytes(kind()) == generator.target().arch.getSizeInBytes(input.kind()); + assert generator.target().getSizeInBytes(kind()) == generator.target().getSizeInBytes(input.kind()); AllocatableValue result = generator.newVariable(kind()); generator.emitMove(result, generator.operand(input));