Assume local variables are naturally aligned.

Using alignment = 0 to signify natural alignment will allow to discern
between loads/stores for stack variables, and dereferencing generic
pointers.

Bug swiftshader:78

Change-Id: I6d9c1728fb9858ca57380bc6bfafc7fb2fa5feae
Reviewed-on: https://swiftshader-review.googlesource.com/10968
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Reactor/Reactor.hpp b/src/Reactor/Reactor.hpp
index 98eb6fd..62d9397 100644
--- a/src/Reactor/Reactor.hpp
+++ b/src/Reactor/Reactor.hpp
@@ -89,8 +89,8 @@
 			return false;
 		}
 
-		Value *loadValue(unsigned int alignment = 0) const;
-		Value *storeValue(Value *value, unsigned int alignment = 0) const;
+		Value *loadValue() const;
+		Value *storeValue(Value *value) const;
 		Value *getAddress(Value *index, bool unsignedIndex) const;
 	};
 
@@ -2105,7 +2105,7 @@
 		template<class S>
 		Pointer(const Pointer<S> &pointer, int alignment = 1) : alignment(alignment)
 		{
-			Value *pointerS = pointer.loadValue(alignment);
+			Value *pointerS = pointer.loadValue();
 			Value *pointerT = Nucleus::createBitCast(pointerS, Nucleus::getPointerType(T::getType()));
 			LValue<Pointer<T>>::storeValue(pointerT);
 		}
@@ -2240,15 +2240,15 @@
 	}
 
 	template<class T>
-	Value *LValue<T>::loadValue(unsigned int alignment) const
+	Value *LValue<T>::loadValue() const
 	{
-		return Nucleus::createLoad(address, T::getType(), false, alignment);
+		return Nucleus::createLoad(address, T::getType(), false, 0);
 	}
 
 	template<class T>
-	Value *LValue<T>::storeValue(Value *value, unsigned int alignment) const
+	Value *LValue<T>::storeValue(Value *value) const
 	{
-		return Nucleus::createStore(value, address, T::getType(), false, alignment);
+		return Nucleus::createStore(value, address, T::getType(), false, 0);
 	}
 
 	template<class T>