Add initial scalar FP operations (addss, subss, etc) to x64 backend.
Adds support for addss and subss. This is the first lowering for sse floating point alu and some move operations. The changes here do some renaming of data structures and adds a couple of new ones to support sse specific operations. The work done here will likely evolve as needed to support an efficient, inituative, and consistent framework.
This commit is contained in:
committed by
Benjamin Bouvier
parent
e5b81bbc28
commit
48f0b10c7a
@@ -136,9 +136,14 @@ impl<I: VCodeInst> VCodeBuilder<I> {
|
||||
|
||||
/// Set the type of a VReg.
|
||||
pub fn set_vreg_type(&mut self, vreg: VirtualReg, ty: Type) {
|
||||
while self.vcode.vreg_types.len() <= vreg.get_index() {
|
||||
self.vcode.vreg_types.push(ir::types::I8); // Default type.
|
||||
if self.vcode.vreg_types.len() <= vreg.get_index() {
|
||||
self.vcode.vreg_types.resize(
|
||||
self.vcode.vreg_types.len()
|
||||
+ ((vreg.get_index() + 1) - self.vcode.vreg_types.len()),
|
||||
ir::types::I8,
|
||||
)
|
||||
}
|
||||
|
||||
self.vcode.vreg_types[vreg.get_index()] = ty;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user