@jfmezei Usually, yes. But like most things in IT, details can vary.
VAX has a wad of CVT conversion instructions, among other wads of instructions including the vector extensions, for instance. VAX offers instructions for pretty much everything to everything (everything circa 1978) and either has an instruction, or maybe has a macro.
For VAX floating point details, see section 9.9 here:
https://docs.vmssoftware.com/docs/VAX_MACRO_INSTRUCTION_SET_REF.pdf#page236
Details here will vary by architecture, and often by implementation within architecture. (q.v. Alpha extensions including the byte-word extension, and Arm SBSA, etc.)
Here’s an Alpha intro, as Alpha was effectively VAX with most of the latent VAX limits removed (not the least of which were the condition codes):
https://www.cs.cmu.edu/afs/cs/academic/class/15213-f98/doc/alpha-guide.pdf
Alpha too has a wad of CVT conversion instructions.
The wrinkle with C code can be the implicit conversions that can (necessarily) arise when mixing data types. I’m not entirely certain a compound if {} else {} and a ?: ternary will produce the same outcome for all possible variations, and I’ve been using C for... for a while.
<voice=buzzlightyear>And UB, UB everywhere.
C looks kinda like a weird PDP-11 in various ways.
If you want to view the instructions of recent architectures, visit godbolt.
https://godbolt.org
#retrocomputing #vax #DigitalEquipmentCorporation #digitalequipment #digitalequipmentcorp #history #computerarchitecture #pdp11 #c #godbolt