FAQ : 64-bit Support : Q: How do I convert my 32-bit Image or ICs to 64-bit?
Q: How do I convert my 32-bit Image or ICs to 64-bit?
Problem
I have an existing 32-bit image (or set of ICs) that I would like to convert to 64-bit. What tools are available to do this?
Solution
There are several options to accomplish this.
Before we continue, there is a fundamental pre-condition that must be satisfied for any image or IC to be converted successfully. Any bindings (Smalltalk glue code used to call/model external functions and data) in your application MUST be 64-bit clean. In other words, the bindings must accurately describe the data-types for functions and structures when run within a 64-bit context. For example, older code may use #uint32 (an unsigned 32-bit integer) as the data type for a pointer. In a 32-bit context, it will run just fine, but a 32-bit integer is not large enough to describe a pointer in 64-bit...so your converted 64-bit program will probably just crash. These are semantic changes that, if present, you must apply manually. There is no cleansing tool which can auto-magically determine the data-types to arbitrary external functions, without additional info, and launder the dirty code 64-bit clean.
The 64-bit virtual machine will auto-convert 32-bit images and ICs on the fly. This can be useful in scenarios where you have an existing 32-bit runtime you don't want to repackage or perhaps are unable to package. Maybe you have existing 32-bit ICs that you want to load in a 64-bit environment. This conversion is detected and performed by the virtual machine at runtime without requiring you to do anything. Depending on the size of the image or ICs, there may be some measurable translation cost as it loads.
If the translation cost of auto-conversion is significant, the 64-bit install of VA Smalltalk comes with a powerful command line tool called 'convic.exe' that will permanently convert 32-bit images and ICs to 64-bit offline.
Here is an example of how to get a description of the supported command line options for the convic utility:
convic.exe –h
Below is an example of how to convert 32-bit images and ICs to 64-bit:
Step 1: Convert 32-bit ICs to 64-bit ICs
Options:
-icInPath <-- [Input] Directory that contains the 32-bit ICs
-icOutPath <-- [Output] Directory that will contain the converted 64-bit ICs
Command:
>convice.exe -icInPath="C:\Program Files (x86)\Instantiations\VA Smalltalk\9.0x86\icsrun" -icOutPath="C:\icsrun64"
 
Step 2: Convert the 32-bit Image to a 64-bit Image
Options:
-icRoot <-- [Input] Directory that contains the 32-bit ICs
-i <-- [Input] Path of the icx file
-icOutPath <-- [Output] Directory that will contain the converted 64-bit icx
Command:
>convic.exe -icRoot="C:\Program Files (x86)\Instantiations\VA Smalltalk\9.0x86\icsrun" -ic="C:\Program Files (x86)\Instantiations\VA Smalltalk\9.0x86\newimage\ibmst.icx" -icOutPath="C:\64BitImages"
Important: The converted 64-bit icx image should run with the 64-bit converted ICs specified as IC_ROOT in the ini file.
Last modified date: 07/04/2018