OSDN Git Service

Fix C++11 compilation errors.
authorNicolas Capens <capn@google.com>
Fri, 21 Nov 2014 17:49:12 +0000 (12:49 -0500)
committerNicolas Capens <nicolascapens@google.com>
Fri, 21 Nov 2014 18:55:14 +0000 (18:55 +0000)
Don't rely on friend method injection, and avoid prefixing constants with strings.

Change-Id: Ide6ab73d13ba3e3534e47323b21f6e5e3ea9d0ab
Reviewed-on: https://swiftshader-review.googlesource.com/1462
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
src/LLVM/LLVM.cbp
src/OpenGL/common/debug.h
src/OpenGL/libEGL/libEGL.cpp
src/OpenGL/libGLESv2/libGLESv2.cbp
src/OpenGL/libGLESv2/libGLESv2.cpp
src/Reactor/Nucleus.hpp

index 0a79fce..6f88cc6 100644 (file)
@@ -90,7 +90,6 @@
                        <Add option="-Wall" />
                        <Add option="-fexceptions" />
                        <Add option="-fno-operator-names" />
-                       <Add option="-ffriend-injection" />
                        <Add option="-msse2" />
                        <Add option="-D__STDC_LIMIT_MACROS" />
                        <Add option="-D__STDC_CONSTANT_MACROS" />
index 492477a..08ef14a 100644 (file)
@@ -31,21 +31,21 @@ namespace es
 #if defined(ANGLE_DISABLE_TRACE)\r
 #define TRACE(message, ...) (void(0))\r
 #else\r
-#define TRACE(message, ...) es::trace("trace: %s(%d): "message"\n", __FUNCTION__, __LINE__, ##__VA_ARGS__)\r
+#define TRACE(message, ...) es::trace("trace: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__)\r
 #endif\r
 \r
 // A macro to output a function call and its arguments to the debugging log, to denote an item in need of fixing.\r
 #if defined(ANGLE_DISABLE_TRACE)\r
 #define FIXME(message, ...) (void(0))\r
 #else\r
-#define FIXME(message, ...) do {es::trace("fixme: %s(%d): "message"\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); assert(false);} while(false)\r
+#define FIXME(message, ...) do {es::trace("fixme: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); assert(false);} while(false)\r
 #endif\r
 \r
 // A macro to output a function call and its arguments to the debugging log, in case of error.\r
 #if defined(ANGLE_DISABLE_TRACE)\r
 #define ERR(message, ...) (void(0))\r
 #else\r
-#define ERR(message, ...) do {es::trace("err: %s(%d): "message"\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); assert(false);} while(false)\r
+#define ERR(message, ...) do {es::trace("err: %s(%d): " message "\n", __FUNCTION__, __LINE__, ##__VA_ARGS__); assert(false);} while(false)\r
 #endif\r
 \r
 // A macro asserting a condition and outputting failures to the debug log\r
index 006005d..1ac4661 100644 (file)
@@ -205,7 +205,7 @@ const char *EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name)
         case EGL_VENDOR:\r
             return success("TransGaming Inc.");\r
         case EGL_VERSION:\r
-            return success("1.4 SwiftShader "VERSION_STRING);\r
+            return success("1.4 SwiftShader " VERSION_STRING);\r
         }\r
 \r
         return error(EGL_BAD_PARAMETER, (const char*)NULL);\r
@@ -789,7 +789,7 @@ EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLCon
                 }\r
             }\r
         }\r
-               \r
+\r
         egl::Display *display = static_cast<egl::Display*>(dpy);\r
 \r
         if(!validateConfig(display, config))\r
index a569eb0..c7a4d1b 100644 (file)
                        <Add option="-Wall" />
                        <Add option="-fexceptions" />
                        <Add option="-fno-operator-names" />
-                       <Add option="-ffriend-injection" />
                        <Add option="-msse2" />
                        <Add option="-D__STDC_LIMIT_MACROS" />
                        <Add option="-D__STDC_CONSTANT_MACROS" />
                <Unit filename="../../Main/Register.hpp" />
                <Unit filename="../../Main/SwiftConfig.cpp" />
                <Unit filename="../../Main/SwiftConfig.hpp" />
-               <Unit filename="../../Main/crc.c">
-                       <Option compilerVar="CC" />
-               </Unit>
+               <Unit filename="../../Main/crc.cpp" />
                <Unit filename="../../Main/crc.h" />
                <Unit filename="../../Main/serialcommon.h" />
                <Unit filename="../../Main/serialvalid.cpp" />
index 076af75..83dea35 100644 (file)
@@ -62,7 +62,7 @@ static bool validateSubImageParams(bool compressed, GLsizei width, GLsizei heigh
 \r
     if(compressed)\r
     {\r
-        if((width % 4 != 0 && width != texture->getWidth(target, 0)) || \r
+        if((width % 4 != 0 && width != texture->getWidth(target, 0)) ||\r
            (height % 4 != 0 && height != texture->getHeight(target, 0)))\r
         {\r
             return error(GL_INVALID_OPERATION, false);\r
@@ -203,10 +203,10 @@ void GL_APIENTRY glBeginQueryEXT(GLenum target, GLuint id)
     {\r
         switch(target)\r
         {\r
-        case GL_ANY_SAMPLES_PASSED_EXT: \r
+        case GL_ANY_SAMPLES_PASSED_EXT:\r
         case GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT:\r
             break;\r
-        default: \r
+        default:\r
             return error(GL_INVALID_ENUM);\r
         }\r
 \r
@@ -319,7 +319,7 @@ void GL_APIENTRY glBindFramebuffer(GLenum target, GLuint framebuffer)
             {\r
                 context->bindReadFramebuffer(framebuffer);\r
             }\r
-            \r
+\r
             if(target == GL_DRAW_FRAMEBUFFER_ANGLE || target == GL_FRAMEBUFFER)\r
             {\r
                 context->bindDrawFramebuffer(framebuffer);\r
@@ -862,10 +862,10 @@ void GL_APIENTRY glCompileShader(GLuint shader)
     }\r
 }\r
 \r
-void GL_APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, \r
+void GL_APIENTRY glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height,\r
                                         GLint border, GLsizei imageSize, const GLvoid* data)\r
 {\r
-    TRACE("(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, GLsizei width = %d, " \r
+    TRACE("(GLenum target = 0x%X, GLint level = %d, GLenum internalformat = 0x%X, GLsizei width = %d, "\r
           "GLsizei height = %d, GLint border = %d, GLsizei imageSize = %d, const GLvoid* data = 0x%0.8p)",\r
           target, level, internalformat, width, height, border, imageSize, data);\r
 \r
@@ -1760,7 +1760,7 @@ void GL_APIENTRY glDetachShader(GLuint program, GLuint shader)
 \r
             es2::Program *programObject = context->getProgram(program);\r
             es2::Shader *shaderObject = context->getShader(shader);\r
-            \r
+\r
             if(!programObject)\r
             {\r
                 es2::Shader *shaderByProgramHandle;\r
@@ -1905,7 +1905,7 @@ void GL_APIENTRY glDrawElements(GLenum mode, GLsizei count, GLenum type, const G
               default:\r
                 return error(GL_INVALID_ENUM);\r
             }\r
-        \r
+\r
             context->drawElements(mode, count, type, indices);\r
         }\r
     }\r
@@ -1979,10 +1979,10 @@ void GL_APIENTRY glEndQueryEXT(GLenum target)
     {\r
         switch(target)\r
         {\r
-        case GL_ANY_SAMPLES_PASSED_EXT: \r
+        case GL_ANY_SAMPLES_PASSED_EXT:\r
         case GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT:\r
             break;\r
-        default: \r
+        default:\r
             return error(GL_INVALID_ENUM);\r
         }\r
 \r
@@ -2862,7 +2862,7 @@ void GL_APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target, GLenum att
 \r
                 framebuffer = context->getReadFramebuffer();\r
             }\r
-            else \r
+            else\r
             {\r
                 if(context->getDrawFramebufferHandle() == 0)\r
                 {\r
@@ -2876,15 +2876,15 @@ void GL_APIENTRY glGetFramebufferAttachmentParameteriv(GLenum target, GLenum att
             GLuint attachmentHandle;\r
             switch(attachment)\r
             {\r
-              case GL_COLOR_ATTACHMENT0:    \r
+              case GL_COLOR_ATTACHMENT0:\r
                 attachmentType = framebuffer->getColorbufferType();\r
-                attachmentHandle = framebuffer->getColorbufferHandle(); \r
+                attachmentHandle = framebuffer->getColorbufferHandle();\r
                 break;\r
-              case GL_DEPTH_ATTACHMENT:     \r
+              case GL_DEPTH_ATTACHMENT:\r
                 attachmentType = framebuffer->getDepthbufferType();\r
                 attachmentHandle = framebuffer->getDepthbufferHandle();\r
                 break;\r
-              case GL_STENCIL_ATTACHMENT:   \r
+              case GL_STENCIL_ATTACHMENT:\r
                 attachmentType = framebuffer->getStencilbufferType();\r
                 attachmentHandle = framebuffer->getStencilbufferHandle();\r
                 break;\r
@@ -3406,9 +3406,9 @@ const GLubyte* GL_APIENTRY glGetString(GLenum name)
         case GL_RENDERER:\r
             return (GLubyte*)"SwiftShader";\r
         case GL_VERSION:\r
-            return (GLubyte*)"OpenGL ES 2.0 SwiftShader "VERSION_STRING;\r
+            return (GLubyte*)"OpenGL ES 2.0 SwiftShader " VERSION_STRING;\r
         case GL_SHADING_LANGUAGE_VERSION:\r
-            return (GLubyte*)"OpenGL ES GLSL ES 1.00 SwiftShader "VERSION_STRING;\r
+            return (GLubyte*)"OpenGL ES GLSL ES 1.00 SwiftShader " VERSION_STRING;\r
         case GL_EXTENSIONS:\r
             // Keep list sorted in following order:\r
                // OES extensions\r
@@ -3645,7 +3645,7 @@ void GL_APIENTRY glGetUniformfv(GLuint program, GLint location, GLfloat* params)
 \r
 void GL_APIENTRY glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint* params)\r
 {\r
-    TRACE("(GLuint program = %d, GLint location = %d, GLsizei bufSize = %d, GLint* params = 0x%0.8p)", \r
+    TRACE("(GLuint program = %d, GLint location = %d, GLsizei bufSize = %d, GLint* params = 0x%0.8p)",\r
           program, location, bufSize, params);\r
 \r
     try\r
@@ -3921,7 +3921,7 @@ void GL_APIENTRY glHint(GLenum target, GLenum mode)
           case GL_DONT_CARE:\r
             break;\r
           default:\r
-            return error(GL_INVALID_ENUM); \r
+            return error(GL_INVALID_ENUM);\r
         }\r
 \r
         es2::Context *context = es2::getContext();\r
@@ -4416,7 +4416,7 @@ void GL_APIENTRY glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei sa
 \r
         if(context)\r
         {\r
-            if(width > es2::IMPLEMENTATION_MAX_RENDERBUFFER_SIZE || \r
+            if(width > es2::IMPLEMENTATION_MAX_RENDERBUFFER_SIZE ||\r
                height > es2::IMPLEMENTATION_MAX_RENDERBUFFER_SIZE ||\r
                samples > es2::IMPLEMENTATION_MAX_SAMPLES)\r
             {\r
@@ -4504,7 +4504,7 @@ void GL_APIENTRY glSetFenceNV(GLuint fence, GLenum condition)
                 return error(GL_INVALID_OPERATION);\r
             }\r
 \r
-            fenceObject->setFence(condition);    \r
+            fenceObject->setFence(condition);\r
         }\r
     }\r
     catch(std::bad_alloc&)\r
@@ -4804,7 +4804,7 @@ GLboolean GL_APIENTRY glTestFenceNV(GLuint fence)
     {\r
         error(GL_OUT_OF_MEMORY);\r
     }\r
-    \r
+\r
     return GL_TRUE;\r
 }\r
 \r
@@ -4957,7 +4957,7 @@ void GL_APIENTRY glTexImage2D(GLenum target, GLint level, GLint internalformat,
                     return error(GL_INVALID_ENUM);\r
                 }\r
             }\r
-                       \r
+\r
             if(target == GL_TEXTURE_2D)\r
             {\r
                 es2::Texture2D *texture = context->getTexture2D();\r
@@ -5194,7 +5194,7 @@ void GL_APIENTRY glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLin
             else if(es2::IsCubemapTextureTarget(target))\r
             {\r
                 es2::TextureCubeMap *texture = context->getTextureCubeMap();\r
-                               \r
+\r
                                if(validateSubImageParams(false, width, height, xoffset, yoffset, target, level, format, texture))\r
                                {\r
                                        texture->subImage(target, level, xoffset, yoffset, width, height, format, type, context->getUnpackAlignment(), pixels);\r
@@ -5317,7 +5317,7 @@ void GL_APIENTRY glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
         {\r
             return error(GL_INVALID_VALUE);\r
         }\r
-        \r
+\r
         if(location == -1)\r
         {\r
             return;\r
@@ -6136,7 +6136,7 @@ void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image
         if(context)\r
         {\r
             es2::Texture2D *texture = 0;\r
-                       \r
+\r
                        switch(target)\r
                        {\r
                        case GL_TEXTURE_2D:           texture = context->getTexture2D();       break;\r
index da2e0a3..db20dae 100644 (file)
@@ -280,7 +280,7 @@ namespace sw
                llvm::Value *storeValue(llvm::Value *value, unsigned int alignment = 0) const;\r
                llvm::Value *getAddress(llvm::Value *index) const;\r
 \r
-       private:\r
+       protected:\r
                llvm::Value *address;\r
        };\r
 \r
@@ -385,13 +385,13 @@ namespace sw
                RValue<Bool> operator=(const Bool &rhs) const;\r
                RValue<Bool> operator=(const Reference<Bool> &rhs) const;\r
 \r
-               friend RValue<Bool> operator!(RValue<Bool> val);\r
-               friend RValue<Bool> operator&&(RValue<Bool> lhs, RValue<Bool> rhs);\r
-               friend RValue<Bool> operator||(RValue<Bool> lhs, RValue<Bool> rhs);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+       RValue<Bool> operator!(RValue<Bool> val);\r
+       RValue<Bool> operator&&(RValue<Bool> lhs, RValue<Bool> rhs);\r
+       RValue<Bool> operator||(RValue<Bool> lhs, RValue<Bool> rhs);\r
+\r
        class Byte : public Variable<Byte>\r
        {\r
        public:\r
@@ -411,43 +411,43 @@ namespace sw
                RValue<Byte> operator=(const Byte &rhs) const;\r
                RValue<Byte> operator=(const Reference<Byte> &rhs) const;\r
 \r
-               friend RValue<Byte> operator+(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator-(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator*(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator/(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator%(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator&(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator|(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator^(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator<<(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator>>(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator+=(const Byte &lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator-=(const Byte &lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator*=(const Byte &lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator/=(const Byte &lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator%=(const Byte &lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator&=(const Byte &lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator|=(const Byte &lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator^=(const Byte &lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator<<=(const Byte &lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator>>=(const Byte &lhs, RValue<Byte> rhs);\r
-               friend RValue<Byte> operator+(RValue<Byte> val);\r
-               friend RValue<Byte> operator-(RValue<Byte> val);\r
-               friend RValue<Byte> operator~(RValue<Byte> val);\r
-               friend RValue<Byte> operator++(const Byte &val, int);   // Post-increment\r
-               friend const Byte &operator++(const Byte &val);   // Pre-increment\r
-               friend RValue<Byte> operator--(const Byte &val, int);   // Post-decrement\r
-               friend const Byte &operator--(const Byte &val);   // Pre-decrement\r
-               friend RValue<Bool> operator<(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Bool> operator<=(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Bool> operator>(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Bool> operator>=(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Bool> operator!=(RValue<Byte> lhs, RValue<Byte> rhs);\r
-               friend RValue<Bool> operator==(RValue<Byte> lhs, RValue<Byte> rhs);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+       RValue<Byte> operator+(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator-(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator*(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator/(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator%(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator&(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator|(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator^(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator<<(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator>>(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator+=(const Byte &lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator-=(const Byte &lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator*=(const Byte &lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator/=(const Byte &lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator%=(const Byte &lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator&=(const Byte &lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator|=(const Byte &lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator^=(const Byte &lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator<<=(const Byte &lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator>>=(const Byte &lhs, RValue<Byte> rhs);\r
+       RValue<Byte> operator+(RValue<Byte> val);\r
+       RValue<Byte> operator-(RValue<Byte> val);\r
+       RValue<Byte> operator~(RValue<Byte> val);\r
+       RValue<Byte> operator++(const Byte &val, int);   // Post-increment\r
+       const Byte &operator++(const Byte &val);   // Pre-increment\r
+       RValue<Byte> operator--(const Byte &val, int);   // Post-decrement\r
+       const Byte &operator--(const Byte &val);   // Pre-decrement\r
+       RValue<Bool> operator<(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Bool> operator<=(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Bool> operator>(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Bool> operator>=(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Bool> operator!=(RValue<Byte> lhs, RValue<Byte> rhs);\r
+       RValue<Bool> operator==(RValue<Byte> lhs, RValue<Byte> rhs);\r
+\r
        class SByte : public Variable<SByte>\r
        {\r
        public:\r
@@ -464,43 +464,43 @@ namespace sw
                RValue<SByte> operator=(const SByte &rhs) const;\r
                RValue<SByte> operator=(const Reference<SByte> &rhs) const;\r
 \r
-               friend RValue<SByte> operator+(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator-(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator*(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator/(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator%(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator&(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator|(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator^(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator<<(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator>>(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator+=(const SByte &lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator-=(const SByte &lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator*=(const SByte &lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator/=(const SByte &lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator%=(const SByte &lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator&=(const SByte &lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator|=(const SByte &lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator^=(const SByte &lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator<<=(const SByte &lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator>>=(const SByte &lhs, RValue<SByte> rhs);\r
-               friend RValue<SByte> operator+(RValue<SByte> val);\r
-               friend RValue<SByte> operator-(RValue<SByte> val);\r
-               friend RValue<SByte> operator~(RValue<SByte> val);\r
-               friend RValue<SByte> operator++(const SByte &val, int);   // Post-increment\r
-               friend const SByte &operator++(const SByte &val);   // Pre-increment\r
-               friend RValue<SByte> operator--(const SByte &val, int);   // Post-decrement\r
-               friend const SByte &operator--(const SByte &val);   // Pre-decrement\r
-               friend RValue<Bool> operator<(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<Bool> operator<=(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<Bool> operator>(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<Bool> operator>=(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<Bool> operator!=(RValue<SByte> lhs, RValue<SByte> rhs);\r
-               friend RValue<Bool> operator==(RValue<SByte> lhs, RValue<SByte> rhs);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+       RValue<SByte> operator+(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator-(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator*(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator/(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator%(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator&(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator|(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator^(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator<<(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator>>(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator+=(const SByte &lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator-=(const SByte &lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator*=(const SByte &lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator/=(const SByte &lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator%=(const SByte &lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator&=(const SByte &lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator|=(const SByte &lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator^=(const SByte &lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator<<=(const SByte &lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator>>=(const SByte &lhs, RValue<SByte> rhs);\r
+       RValue<SByte> operator+(RValue<SByte> val);\r
+       RValue<SByte> operator-(RValue<SByte> val);\r
+       RValue<SByte> operator~(RValue<SByte> val);\r
+       RValue<SByte> operator++(const SByte &val, int);   // Post-increment\r
+       const SByte &operator++(const SByte &val);   // Pre-increment\r
+       RValue<SByte> operator--(const SByte &val, int);   // Post-decrement\r
+       const SByte &operator--(const SByte &val);   // Pre-decrement\r
+       RValue<Bool> operator<(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<Bool> operator<=(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<Bool> operator>(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<Bool> operator>=(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<Bool> operator!=(RValue<SByte> lhs, RValue<SByte> rhs);\r
+       RValue<Bool> operator==(RValue<SByte> lhs, RValue<SByte> rhs);\r
+\r
        class Short : public Variable<Short>\r
        {\r
        public:\r
@@ -519,43 +519,43 @@ namespace sw
                RValue<Short> operator=(const Short &rhs) const;\r
                RValue<Short> operator=(const Reference<Short> &rhs) const;\r
 \r
-               friend RValue<Short> operator+(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator-(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator*(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator/(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator%(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator&(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator|(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator^(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator<<(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator>>(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator+=(const Short &lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator-=(const Short &lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator*=(const Short &lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator/=(const Short &lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator%=(const Short &lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator&=(const Short &lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator|=(const Short &lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator^=(const Short &lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator<<=(const Short &lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator>>=(const Short &lhs, RValue<Short> rhs);\r
-               friend RValue<Short> operator+(RValue<Short> val);\r
-               friend RValue<Short> operator-(RValue<Short> val);\r
-               friend RValue<Short> operator~(RValue<Short> val);\r
-               friend RValue<Short> operator++(const Short &val, int);   // Post-increment\r
-               friend const Short &operator++(const Short &val);   // Pre-increment\r
-               friend RValue<Short> operator--(const Short &val, int);   // Post-decrement\r
-               friend const Short &operator--(const Short &val);   // Pre-decrement\r
-               friend RValue<Bool> operator<(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Bool> operator<=(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Bool> operator>(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Bool> operator>=(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Bool> operator!=(RValue<Short> lhs, RValue<Short> rhs);\r
-               friend RValue<Bool> operator==(RValue<Short> lhs, RValue<Short> rhs);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+       RValue<Short> operator+(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Short> operator-(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Short> operator*(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Short> operator/(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Short> operator%(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Short> operator&(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Short> operator|(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Short> operator^(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Short> operator<<(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Short> operator>>(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Short> operator+=(const Short &lhs, RValue<Short> rhs);\r
+       RValue<Short> operator-=(const Short &lhs, RValue<Short> rhs);\r
+       RValue<Short> operator*=(const Short &lhs, RValue<Short> rhs);\r
+       RValue<Short> operator/=(const Short &lhs, RValue<Short> rhs);\r
+       RValue<Short> operator%=(const Short &lhs, RValue<Short> rhs);\r
+       RValue<Short> operator&=(const Short &lhs, RValue<Short> rhs);\r
+       RValue<Short> operator|=(const Short &lhs, RValue<Short> rhs);\r
+       RValue<Short> operator^=(const Short &lhs, RValue<Short> rhs);\r
+       RValue<Short> operator<<=(const Short &lhs, RValue<Short> rhs);\r
+       RValue<Short> operator>>=(const Short &lhs, RValue<Short> rhs);\r
+       RValue<Short> operator+(RValue<Short> val);\r
+       RValue<Short> operator-(RValue<Short> val);\r
+       RValue<Short> operator~(RValue<Short> val);\r
+       RValue<Short> operator++(const Short &val, int);   // Post-increment\r
+       const Short &operator++(const Short &val);   // Pre-increment\r
+       RValue<Short> operator--(const Short &val, int);   // Post-decrement\r
+       const Short &operator--(const Short &val);   // Pre-decrement\r
+       RValue<Bool> operator<(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Bool> operator<=(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Bool> operator>(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Bool> operator>=(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Bool> operator!=(RValue<Short> lhs, RValue<Short> rhs);\r
+       RValue<Bool> operator==(RValue<Short> lhs, RValue<Short> rhs);\r
+\r
        class UShort : public Variable<UShort>\r
        {\r
        public:\r
@@ -572,43 +572,43 @@ namespace sw
                RValue<UShort> operator=(const UShort &rhs) const;\r
                RValue<UShort> operator=(const Reference<UShort> &rhs) const;\r
 \r
-               friend RValue<UShort> operator+(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator-(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator*(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator/(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator%(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator&(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator|(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator^(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator<<(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator>>(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator+=(const UShort &lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator-=(const UShort &lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator*=(const UShort &lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator/=(const UShort &lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator%=(const UShort &lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator&=(const UShort &lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator|=(const UShort &lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator^=(const UShort &lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator<<=(const UShort &lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator>>=(const UShort &lhs, RValue<UShort> rhs);\r
-               friend RValue<UShort> operator+(RValue<UShort> val);\r
-               friend RValue<UShort> operator-(RValue<UShort> val);\r
-               friend RValue<UShort> operator~(RValue<UShort> val);\r
-               friend RValue<UShort> operator++(const UShort &val, int);   // Post-increment\r
-               friend const UShort &operator++(const UShort &val);   // Pre-increment\r
-               friend RValue<UShort> operator--(const UShort &val, int);   // Post-decrement\r
-               friend const UShort &operator--(const UShort &val);   // Pre-decrement\r
-               friend RValue<Bool> operator<(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<Bool> operator<=(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<Bool> operator>(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<Bool> operator>=(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<Bool> operator!=(RValue<UShort> lhs, RValue<UShort> rhs);\r
-               friend RValue<Bool> operator==(RValue<UShort> lhs, RValue<UShort> rhs);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+       RValue<UShort> operator+(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator-(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator*(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator/(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator%(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator&(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator|(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator^(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator<<(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator>>(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator+=(const UShort &lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator-=(const UShort &lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator*=(const UShort &lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator/=(const UShort &lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator%=(const UShort &lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator&=(const UShort &lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator|=(const UShort &lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator^=(const UShort &lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator<<=(const UShort &lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator>>=(const UShort &lhs, RValue<UShort> rhs);\r
+       RValue<UShort> operator+(RValue<UShort> val);\r
+       RValue<UShort> operator-(RValue<UShort> val);\r
+       RValue<UShort> operator~(RValue<UShort> val);\r
+       RValue<UShort> operator++(const UShort &val, int);   // Post-increment\r
+       const UShort &operator++(const UShort &val);   // Pre-increment\r
+       RValue<UShort> operator--(const UShort &val, int);   // Post-decrement\r
+       const UShort &operator--(const UShort &val);   // Pre-decrement\r
+       RValue<Bool> operator<(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<Bool> operator<=(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<Bool> operator>(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<Bool> operator>=(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<Bool> operator!=(RValue<UShort> lhs, RValue<UShort> rhs);\r
+       RValue<Bool> operator==(RValue<UShort> lhs, RValue<UShort> rhs);\r
+\r
        class Byte4 : public Variable<Byte4>\r
        {\r
        public:\r
@@ -622,37 +622,37 @@ namespace sw
        //      RValue<Byte4> operator=(const Byte4 &rhs) const;\r
        //      RValue<Byte4> operator=(const Reference<Byte4> &rhs) const;\r
 \r
-       //      friend RValue<Byte4> operator+(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator-(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator*(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator/(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator%(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator&(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator|(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator^(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator<<(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator>>(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator+=(const Byte4 &lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator-=(const Byte4 &lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator*=(const Byte4 &lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator/=(const Byte4 &lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator%=(const Byte4 &lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator&=(const Byte4 &lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator|=(const Byte4 &lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator^=(const Byte4 &lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator<<=(const Byte4 &lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator>>=(const Byte4 &lhs, RValue<Byte4> rhs);\r
-       //      friend RValue<Byte4> operator+(RValue<Byte4> val);\r
-       //      friend RValue<Byte4> operator-(RValue<Byte4> val);\r
-       //      friend RValue<Byte4> operator~(RValue<Byte4> val);\r
-       //      friend RValue<Byte4> operator++(const Byte4 &val, int);   // Post-increment\r
-       //      friend const Byte4 &operator++(const Byte4 &val);   // Pre-increment\r
-       //      friend RValue<Byte4> operator--(const Byte4 &val, int);   // Post-decrement\r
-       //      friend const Byte4 &operator--(const Byte4 &val);   // Pre-decrement\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+//     RValue<Byte4> operator+(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator-(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator*(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator/(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator%(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator&(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator|(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator^(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator<<(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator>>(RValue<Byte4> lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator+=(const Byte4 &lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator-=(const Byte4 &lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator*=(const Byte4 &lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator/=(const Byte4 &lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator%=(const Byte4 &lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator&=(const Byte4 &lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator|=(const Byte4 &lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator^=(const Byte4 &lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator<<=(const Byte4 &lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator>>=(const Byte4 &lhs, RValue<Byte4> rhs);\r
+//     RValue<Byte4> operator+(RValue<Byte4> val);\r
+//     RValue<Byte4> operator-(RValue<Byte4> val);\r
+//     RValue<Byte4> operator~(RValue<Byte4> val);\r
+//     RValue<Byte4> operator++(const Byte4 &val, int);   // Post-increment\r
+//     const Byte4 &operator++(const Byte4 &val);   // Pre-increment\r
+//     RValue<Byte4> operator--(const Byte4 &val, int);   // Post-decrement\r
+//     const Byte4 &operator--(const Byte4 &val);   // Pre-decrement\r
+\r
        class SByte4 : public Variable<SByte4>\r
        {\r
        public:\r
@@ -666,37 +666,37 @@ namespace sw
        //      RValue<SByte4> operator=(const SByte4 &rhs) const;\r
        //      RValue<SByte4> operator=(const Reference<SByte4> &rhs) const;\r
 \r
-       //      friend RValue<SByte4> operator+(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator-(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator*(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator/(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator%(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator&(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator|(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator^(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator<<(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator>>(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator+=(const SByte4 &lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator-=(const SByte4 &lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator*=(const SByte4 &lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator/=(const SByte4 &lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator%=(const SByte4 &lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator&=(const SByte4 &lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator|=(const SByte4 &lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator^=(const SByte4 &lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator<<=(const SByte4 &lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator>>=(const SByte4 &lhs, RValue<SByte4> rhs);\r
-       //      friend RValue<SByte4> operator+(RValue<SByte4> val);\r
-       //      friend RValue<SByte4> operator-(RValue<SByte4> val);\r
-       //      friend RValue<SByte4> operator~(RValue<SByte4> val);\r
-       //      friend RValue<SByte4> operator++(const SByte4 &val, int);   // Post-increment\r
-       //      friend const SByte4 &operator++(const SByte4 &val);   // Pre-increment\r
-       //      friend RValue<SByte4> operator--(const SByte4 &val, int);   // Post-decrement\r
-       //      friend const SByte4 &operator--(const SByte4 &val);   // Pre-decrement\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+//     RValue<SByte4> operator+(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator-(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator*(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator/(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator%(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator&(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator|(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator^(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator<<(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator>>(RValue<SByte4> lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator+=(const SByte4 &lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator-=(const SByte4 &lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator*=(const SByte4 &lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator/=(const SByte4 &lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator%=(const SByte4 &lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator&=(const SByte4 &lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator|=(const SByte4 &lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator^=(const SByte4 &lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator<<=(const SByte4 &lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator>>=(const SByte4 &lhs, RValue<SByte4> rhs);\r
+//     RValue<SByte4> operator+(RValue<SByte4> val);\r
+//     RValue<SByte4> operator-(RValue<SByte4> val);\r
+//     RValue<SByte4> operator~(RValue<SByte4> val);\r
+//     RValue<SByte4> operator++(const SByte4 &val, int);   // Post-increment\r
+//     const SByte4 &operator++(const SByte4 &val);   // Pre-increment\r
+//     RValue<SByte4> operator--(const SByte4 &val, int);   // Post-decrement\r
+//     const SByte4 &operator--(const SByte4 &val);   // Pre-decrement\r
+\r
        class Byte8 : public Variable<Byte8>\r
        {\r
        public:\r
@@ -711,48 +711,46 @@ namespace sw
                RValue<Byte8> operator=(const Byte8 &rhs) const;\r
                RValue<Byte8> operator=(const Reference<Byte8> &rhs) const;\r
 \r
-               friend RValue<Byte8> operator+(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
-               friend RValue<Byte8> operator-(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
-       //      friend RValue<Byte8> operator*(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
-       //      friend RValue<Byte8> operator/(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
-       //      friend RValue<Byte8> operator%(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
-               friend RValue<Byte8> operator&(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
-               friend RValue<Byte8> operator|(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
-               friend RValue<Byte8> operator^(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
-       //      friend RValue<Byte8> operator<<(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
-       //      friend RValue<Byte8> operator>>(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
-               friend RValue<Byte8> operator+=(const Byte8 &lhs, RValue<Byte8> rhs);\r
-               friend RValue<Byte8> operator-=(const Byte8 &lhs, RValue<Byte8> rhs);\r
-       //      friend RValue<Byte8> operator*=(const Byte8 &lhs, RValue<Byte8> rhs);\r
-       //      friend RValue<Byte8> operator/=(const Byte8 &lhs, RValue<Byte8> rhs);\r
-       //      friend RValue<Byte8> operator%=(const Byte8 &lhs, RValue<Byte8> rhs);\r
-               friend RValue<Byte8> operator&=(const Byte8 &lhs, RValue<Byte8> rhs);\r
-               friend RValue<Byte8> operator|=(const Byte8 &lhs, RValue<Byte8> rhs);\r
-               friend RValue<Byte8> operator^=(const Byte8 &lhs, RValue<Byte8> rhs);\r
-       //      friend RValue<Byte8> operator<<=(const Byte8 &lhs, RValue<Byte8> rhs);\r
-       //      friend RValue<Byte8> operator>>=(const Byte8 &lhs, RValue<Byte8> rhs);\r
-       //      friend RValue<Byte8> operator+(RValue<Byte8> val);\r
-       //      friend RValue<Byte8> operator-(RValue<Byte8> val);\r
-               friend RValue<Byte8> operator~(RValue<Byte8> val);\r
-       //      friend RValue<Byte8> operator++(const Byte8 &val, int);   // Post-increment\r
-       //      friend const Byte8 &operator++(const Byte8 &val);   // Pre-increment\r
-       //      friend RValue<Byte8> operator--(const Byte8 &val, int);   // Post-decrement\r
-       //      friend const Byte8 &operator--(const Byte8 &val);   // Pre-decrement\r
-\r
-               friend RValue<Byte8> AddSat(RValue<Byte8> x, RValue<Byte8> y);\r
-               friend RValue<Byte8> SubSat(RValue<Byte8> x, RValue<Byte8> y);\r
-\r
-               friend RValue<Short4> Unpack(RValue<Byte4> x);\r
-               friend RValue<Short4> UnpackLow(RValue<Byte8> x, RValue<Byte8> y);\r
-               friend RValue<Short4> UnpackHigh(RValue<Byte8> x, RValue<Byte8> y);\r
-               friend RValue<Int> SignMask(RValue<Byte8> x);\r
-\r
-       //      friend RValue<Byte8> CmpGT(RValue<Byte8> x, RValue<Byte8> y);\r
-               friend RValue<Byte8> CmpEQ(RValue<Byte8> x, RValue<Byte8> y);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+       RValue<Byte8> operator+(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
+       RValue<Byte8> operator-(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
+//     RValue<Byte8> operator*(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
+//     RValue<Byte8> operator/(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
+//     RValue<Byte8> operator%(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
+       RValue<Byte8> operator&(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
+       RValue<Byte8> operator|(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
+       RValue<Byte8> operator^(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
+//     RValue<Byte8> operator<<(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
+//     RValue<Byte8> operator>>(RValue<Byte8> lhs, RValue<Byte8> rhs);\r
+       RValue<Byte8> operator+=(const Byte8 &lhs, RValue<Byte8> rhs);\r
+       RValue<Byte8> operator-=(const Byte8 &lhs, RValue<Byte8> rhs);\r
+//     RValue<Byte8> operator*=(const Byte8 &lhs, RValue<Byte8> rhs);\r
+//     RValue<Byte8> operator/=(const Byte8 &lhs, RValue<Byte8> rhs);\r
+//     RValue<Byte8> operator%=(const Byte8 &lhs, RValue<Byte8> rhs);\r
+       RValue<Byte8> operator&=(const Byte8 &lhs, RValue<Byte8> rhs);\r
+       RValue<Byte8> operator|=(const Byte8 &lhs, RValue<Byte8> rhs);\r
+       RValue<Byte8> operator^=(const Byte8 &lhs, RValue<Byte8> rhs);\r
+//     RValue<Byte8> operator<<=(const Byte8 &lhs, RValue<Byte8> rhs);\r
+//     RValue<Byte8> operator>>=(const Byte8 &lhs, RValue<Byte8> rhs);\r
+//     RValue<Byte8> operator+(RValue<Byte8> val);\r
+//     RValue<Byte8> operator-(RValue<Byte8> val);\r
+       RValue<Byte8> operator~(RValue<Byte8> val);\r
+//     RValue<Byte8> operator++(const Byte8 &val, int);   // Post-increment\r
+//     const Byte8 &operator++(const Byte8 &val);   // Pre-increment\r
+//     RValue<Byte8> operator--(const Byte8 &val, int);   // Post-decrement\r
+//     const Byte8 &operator--(const Byte8 &val);   // Pre-decrement\r
+\r
+       RValue<Byte8> AddSat(RValue<Byte8> x, RValue<Byte8> y);\r
+       RValue<Byte8> SubSat(RValue<Byte8> x, RValue<Byte8> y);\r
+       RValue<Short4> Unpack(RValue<Byte4> x);\r
+       RValue<Short4> UnpackLow(RValue<Byte8> x, RValue<Byte8> y);\r
+       RValue<Short4> UnpackHigh(RValue<Byte8> x, RValue<Byte8> y);\r
+       RValue<Int> SignMask(RValue<Byte8> x);\r
+//     RValue<Byte8> CmpGT(RValue<Byte8> x, RValue<Byte8> y);\r
+       RValue<Byte8> CmpEQ(RValue<Byte8> x, RValue<Byte8> y);\r
+\r
        class SByte8 : public Variable<SByte8>\r
        {\r
        public:\r
@@ -767,47 +765,45 @@ namespace sw
                RValue<SByte8> operator=(const SByte8 &rhs) const;\r
                RValue<SByte8> operator=(const Reference<SByte8> &rhs) const;\r
 \r
-               friend RValue<SByte8> operator+(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
-               friend RValue<SByte8> operator-(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
-       //      friend RValue<SByte8> operator*(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
-       //      friend RValue<SByte8> operator/(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
-       //      friend RValue<SByte8> operator%(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
-               friend RValue<SByte8> operator&(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
-               friend RValue<SByte8> operator|(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
-               friend RValue<SByte8> operator^(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
-       //      friend RValue<SByte8> operator<<(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
-       //      friend RValue<SByte8> operator>>(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
-               friend RValue<SByte8> operator+=(const SByte8 &lhs, RValue<SByte8> rhs);\r
-               friend RValue<SByte8> operator-=(const SByte8 &lhs, RValue<SByte8> rhs);\r
-       //      friend RValue<SByte8> operator*=(const SByte8 &lhs, RValue<SByte8> rhs);\r
-       //      friend RValue<SByte8> operator/=(const SByte8 &lhs, RValue<SByte8> rhs);\r
-       //      friend RValue<SByte8> operator%=(const SByte8 &lhs, RValue<SByte8> rhs);\r
-               friend RValue<SByte8> operator&=(const SByte8 &lhs, RValue<SByte8> rhs);\r
-               friend RValue<SByte8> operator|=(const SByte8 &lhs, RValue<SByte8> rhs);\r
-               friend RValue<SByte8> operator^=(const SByte8 &lhs, RValue<SByte8> rhs);\r
-       //      friend RValue<SByte8> operator<<=(const SByte8 &lhs, RValue<SByte8> rhs);\r
-       //      friend RValue<SByte8> operator>>=(const SByte8 &lhs, RValue<SByte8> rhs);\r
-       //      friend RValue<SByte8> operator+(RValue<SByte8> val);\r
-       //      friend RValue<SByte8> operator-(RValue<SByte8> val);\r
-               friend RValue<SByte8> operator~(RValue<SByte8> val);\r
-       //      friend RValue<SByte8> operator++(const SByte8 &val, int);   // Post-increment\r
-       //      friend const SByte8 &operator++(const SByte8 &val);   // Pre-increment\r
-       //      friend RValue<SByte8> operator--(const SByte8 &val, int);   // Post-decrement\r
-       //      friend const SByte8 &operator--(const SByte8 &val);   // Pre-decrement\r
-\r
-               friend RValue<SByte8> AddSat(RValue<SByte8> x, RValue<SByte8> y);\r
-               friend RValue<SByte8> SubSat(RValue<SByte8> x, RValue<SByte8> y);\r
-\r
-               friend RValue<Short4> UnpackLow(RValue<SByte8> x, RValue<SByte8> y);\r
-               friend RValue<Short4> UnpackHigh(RValue<SByte8> x, RValue<SByte8> y);\r
-               friend RValue<Int> SignMask(RValue<SByte8> x);\r
-\r
-               friend RValue<Byte8> CmpGT(RValue<SByte8> x, RValue<SByte8> y);\r
-               friend RValue<Byte8> CmpEQ(RValue<SByte8> x, RValue<SByte8> y);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+       RValue<SByte8> operator+(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
+       RValue<SByte8> operator-(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
+//     RValue<SByte8> operator*(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
+//     RValue<SByte8> operator/(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
+//     RValue<SByte8> operator%(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
+       RValue<SByte8> operator&(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
+       RValue<SByte8> operator|(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
+       RValue<SByte8> operator^(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
+//     RValue<SByte8> operator<<(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
+//     RValue<SByte8> operator>>(RValue<SByte8> lhs, RValue<SByte8> rhs);\r
+       RValue<SByte8> operator+=(const SByte8 &lhs, RValue<SByte8> rhs);\r
+       RValue<SByte8> operator-=(const SByte8 &lhs, RValue<SByte8> rhs);\r
+//     RValue<SByte8> operator*=(const SByte8 &lhs, RValue<SByte8> rhs);\r
+//     RValue<SByte8> operator/=(const SByte8 &lhs, RValue<SByte8> rhs);\r
+//     RValue<SByte8> operator%=(const SByte8 &lhs, RValue<SByte8> rhs);\r
+       RValue<SByte8> operator&=(const SByte8 &lhs, RValue<SByte8> rhs);\r
+       RValue<SByte8> operator|=(const SByte8 &lhs, RValue<SByte8> rhs);\r
+       RValue<SByte8> operator^=(const SByte8 &lhs, RValue<SByte8> rhs);\r
+//     RValue<SByte8> operator<<=(const SByte8 &lhs, RValue<SByte8> rhs);\r
+//     RValue<SByte8> operator>>=(const SByte8 &lhs, RValue<SByte8> rhs);\r
+//     RValue<SByte8> operator+(RValue<SByte8> val);\r
+//     RValue<SByte8> operator-(RValue<SByte8> val);\r
+       RValue<SByte8> operator~(RValue<SByte8> val);\r
+//     RValue<SByte8> operator++(const SByte8 &val, int);   // Post-increment\r
+//     const SByte8 &operator++(const SByte8 &val);   // Pre-increment\r
+//     RValue<SByte8> operator--(const SByte8 &val, int);   // Post-decrement\r
+//     const SByte8 &operator--(const SByte8 &val);   // Pre-decrement\r
+\r
+    RValue<SByte8> AddSat(RValue<SByte8> x, RValue<SByte8> y);\r
+       RValue<SByte8> SubSat(RValue<SByte8> x, RValue<SByte8> y);\r
+       RValue<Short4> UnpackLow(RValue<SByte8> x, RValue<SByte8> y);\r
+       RValue<Short4> UnpackHigh(RValue<SByte8> x, RValue<SByte8> y);\r
+       RValue<Int> SignMask(RValue<SByte8> x);\r
+       RValue<Byte8> CmpGT(RValue<SByte8> x, RValue<SByte8> y);\r
+       RValue<Byte8> CmpEQ(RValue<SByte8> x, RValue<SByte8> y);\r
+\r
        class Byte16 : public Variable<Byte16>\r
        {\r
        public:\r
@@ -821,37 +817,37 @@ namespace sw
                RValue<Byte16> operator=(const Byte16 &rhs) const;\r
                RValue<Byte16> operator=(const Reference<Byte16> &rhs) const;\r
 \r
-       //      friend RValue<Byte16> operator+(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator-(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator*(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator/(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator%(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator&(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator|(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator^(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator<<(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator>>(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator+=(const Byte16 &lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator-=(const Byte16 &lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator*=(const Byte16 &lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator/=(const Byte16 &lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator%=(const Byte16 &lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator&=(const Byte16 &lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator|=(const Byte16 &lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator^=(const Byte16 &lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator<<=(const Byte16 &lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator>>=(const Byte16 &lhs, RValue<Byte16> rhs);\r
-       //      friend RValue<Byte16> operator+(RValue<Byte16> val);\r
-       //      friend RValue<Byte16> operator-(RValue<Byte16> val);\r
-       //      friend RValue<Byte16> operator~(RValue<Byte16> val);\r
-       //      friend RValue<Byte16> operator++(const Byte16 &val, int);   // Post-increment\r
-       //      friend const Byte16 &operator++(const Byte16 &val);   // Pre-increment\r
-       //      friend RValue<Byte16> operator--(const Byte16 &val, int);   // Post-decrement\r
-       //      friend const Byte16 &operator--(const Byte16 &val);   // Pre-decrement\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+//     RValue<Byte16> operator+(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator-(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator*(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator/(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator%(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator&(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator|(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator^(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator<<(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator>>(RValue<Byte16> lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator+=(const Byte16 &lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator-=(const Byte16 &lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator*=(const Byte16 &lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator/=(const Byte16 &lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator%=(const Byte16 &lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator&=(const Byte16 &lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator|=(const Byte16 &lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator^=(const Byte16 &lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator<<=(const Byte16 &lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator>>=(const Byte16 &lhs, RValue<Byte16> rhs);\r
+//     RValue<Byte16> operator+(RValue<Byte16> val);\r
+//     RValue<Byte16> operator-(RValue<Byte16> val);\r
+//     RValue<Byte16> operator~(RValue<Byte16> val);\r
+//     RValue<Byte16> operator++(const Byte16 &val, int);   // Post-increment\r
+//     const Byte16 &operator++(const Byte16 &val);   // Pre-increment\r
+//     RValue<Byte16> operator--(const Byte16 &val, int);   // Post-decrement\r
+//     const Byte16 &operator--(const Byte16 &val);   // Pre-decrement\r
+\r
        class SByte16 : public Variable<SByte16>\r
        {\r
        public:\r
@@ -865,37 +861,37 @@ namespace sw
        //      RValue<SByte16> operator=(const SByte16 &rhs) const;\r
        //      RValue<SByte16> operator=(const Reference<SByte16> &rhs) const;\r
 \r
-       //      friend RValue<SByte16> operator+(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator-(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator*(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator/(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator%(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator&(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator|(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator^(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator<<(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator>>(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator+=(const SByte16 &lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator-=(const SByte16 &lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator*=(const SByte16 &lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator/=(const SByte16 &lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator%=(const SByte16 &lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator&=(const SByte16 &lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator|=(const SByte16 &lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator^=(const SByte16 &lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator<<=(const SByte16 &lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator>>=(const SByte16 &lhs, RValue<SByte16> rhs);\r
-       //      friend RValue<SByte16> operator+(RValue<SByte16> val);\r
-       //      friend RValue<SByte16> operator-(RValue<SByte16> val);\r
-       //      friend RValue<SByte16> operator~(RValue<SByte16> val);\r
-       //      friend RValue<SByte16> operator++(const SByte16 &val, int);   // Post-increment\r
-       //      friend const SByte16 &operator++(const SByte16 &val);   // Pre-increment\r
-       //      friend RValue<SByte16> operator--(const SByte16 &val, int);   // Post-decrement\r
-       //      friend const SByte16 &operator--(const SByte16 &val);   // Pre-decrement\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+//     RValue<SByte16> operator+(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator-(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator*(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator/(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator%(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator&(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator|(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator^(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator<<(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator>>(RValue<SByte16> lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator+=(const SByte16 &lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator-=(const SByte16 &lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator*=(const SByte16 &lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator/=(const SByte16 &lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator%=(const SByte16 &lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator&=(const SByte16 &lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator|=(const SByte16 &lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator^=(const SByte16 &lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator<<=(const SByte16 &lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator>>=(const SByte16 &lhs, RValue<SByte16> rhs);\r
+//     RValue<SByte16> operator+(RValue<SByte16> val);\r
+//     RValue<SByte16> operator-(RValue<SByte16> val);\r
+//     RValue<SByte16> operator~(RValue<SByte16> val);\r
+//     RValue<SByte16> operator++(const SByte16 &val, int);   // Post-increment\r
+//     const SByte16 &operator++(const SByte16 &val);   // Pre-increment\r
+//     RValue<SByte16> operator--(const SByte16 &val, int);   // Post-decrement\r
+//     const SByte16 &operator--(const SByte16 &val);   // Pre-decrement\r
+\r
        class Short4 : public Variable<Short4>\r
        {\r
        public:\r
@@ -921,66 +917,63 @@ namespace sw
                RValue<Short4> operator=(const UShort4 &rhs) const;\r
                RValue<Short4> operator=(const Reference<UShort4> &rhs) const;\r
 \r
-               friend RValue<Short4> operator+(RValue<Short4> lhs, RValue<Short4> rhs);\r
-               friend RValue<Short4> operator-(RValue<Short4> lhs, RValue<Short4> rhs);\r
-               friend RValue<Short4> operator*(RValue<Short4> lhs, RValue<Short4> rhs);\r
-       //      friend RValue<Short4> operator/(RValue<Short4> lhs, RValue<Short4> rhs);\r
-       //      friend RValue<Short4> operator%(RValue<Short4> lhs, RValue<Short4> rhs);\r
-               friend RValue<Short4> operator&(RValue<Short4> lhs, RValue<Short4> rhs);\r
-               friend RValue<Short4> operator|(RValue<Short4> lhs, RValue<Short4> rhs);\r
-               friend RValue<Short4> operator^(RValue<Short4> lhs, RValue<Short4> rhs);\r
-               friend RValue<Short4> operator<<(RValue<Short4> lhs, unsigned char rhs);\r
-               friend RValue<Short4> operator>>(RValue<Short4> lhs, unsigned char rhs);\r
-               friend RValue<Short4> operator<<(RValue<Short4> lhs, RValue<Long1> rhs);\r
-               friend RValue<Short4> operator>>(RValue<Short4> lhs, RValue<Long1> rhs);\r
-               friend RValue<Short4> operator+=(const Short4 &lhs, RValue<Short4> rhs);\r
-               friend RValue<Short4> operator-=(const Short4 &lhs, RValue<Short4> rhs);\r
-               friend RValue<Short4> operator*=(const Short4 &lhs, RValue<Short4> rhs);\r
-       //      friend RValue<Short4> operator/=(const Short4 &lhs, RValue<Short4> rhs);\r
-       //      friend RValue<Short4> operator%=(const Short4 &lhs, RValue<Short4> rhs);\r
-               friend RValue<Short4> operator&=(const Short4 &lhs, RValue<Short4> rhs);\r
-               friend RValue<Short4> operator|=(const Short4 &lhs, RValue<Short4> rhs);\r
-               friend RValue<Short4> operator^=(const Short4 &lhs, RValue<Short4> rhs);\r
-               friend RValue<Short4> operator<<=(const Short4 &lhs, unsigned char rhs);\r
-               friend RValue<Short4> operator>>=(const Short4 &lhs, unsigned char rhs);\r
-               friend RValue<Short4> operator<<=(const Short4 &lhs, RValue<Long1> rhs);\r
-               friend RValue<Short4> operator>>=(const Short4 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Short4> operator+(RValue<Short4> val);\r
-               friend RValue<Short4> operator-(RValue<Short4> val);\r
-               friend RValue<Short4> operator~(RValue<Short4> val);\r
-       //      friend RValue<Short4> operator++(const Short4 &val, int);   // Post-increment\r
-       //      friend const Short4 &operator++(const Short4 &val);   // Pre-increment\r
-       //      friend RValue<Short4> operator--(const Short4 &val, int);   // Post-decrement\r
-       //      friend const Short4 &operator--(const Short4 &val);   // Pre-decrement\r
-       //      friend RValue<Bool> operator<(RValue<Short4> lhs, RValue<Short4> rhs);\r
-       //      friend RValue<Bool> operator<=(RValue<Short4> lhs, RValue<Short4> rhs);\r
-       //      friend RValue<Bool> operator>(RValue<Short4> lhs, RValue<Short4> rhs);\r
-       //      friend RValue<Bool> operator>=(RValue<Short4> lhs, RValue<Short4> rhs);\r
-       //      friend RValue<Bool> operator!=(RValue<Short4> lhs, RValue<Short4> rhs);\r
-       //      friend RValue<Bool> operator==(RValue<Short4> lhs, RValue<Short4> rhs);\r
-\r
-               friend RValue<Short4> RoundShort4(RValue<Float4> cast);\r
-\r
-               friend RValue<Short4> Max(RValue<Short4> x, RValue<Short4> y);\r
-               friend RValue<Short4> Min(RValue<Short4> x, RValue<Short4> y);\r
-               friend RValue<Short4> AddSat(RValue<Short4> x, RValue<Short4> y);\r
-               friend RValue<Short4> SubSat(RValue<Short4> x, RValue<Short4> y);\r
-               friend RValue<Short4> MulHigh(RValue<Short4> x, RValue<Short4> y);\r
-               friend RValue<Int2> MulAdd(RValue<Short4> x, RValue<Short4> y);\r
-\r
-               friend RValue<SByte8> Pack(RValue<Short4> x, RValue<Short4> y);\r
-               friend RValue<Int2> UnpackLow(RValue<Short4> x, RValue<Short4> y);\r
-               friend RValue<Int2> UnpackHigh(RValue<Short4> x, RValue<Short4> y);\r
-               friend RValue<Short4> Swizzle(RValue<Short4> x, unsigned char select);\r
-               friend RValue<Short4> Insert(RValue<Short4> val, RValue<Short> element, int i);\r
-               friend RValue<Short> Extract(RValue<Short4> val, int i);\r
-\r
-               friend RValue<Short4> CmpGT(RValue<Short4> x, RValue<Short4> y);\r
-               friend RValue<Short4> CmpEQ(RValue<Short4> x, RValue<Short4> y);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+       RValue<Short4> operator+(RValue<Short4> lhs, RValue<Short4> rhs);\r
+       RValue<Short4> operator-(RValue<Short4> lhs, RValue<Short4> rhs);\r
+       RValue<Short4> operator*(RValue<Short4> lhs, RValue<Short4> rhs);\r
+//     RValue<Short4> operator/(RValue<Short4> lhs, RValue<Short4> rhs);\r
+//     RValue<Short4> operator%(RValue<Short4> lhs, RValue<Short4> rhs);\r
+       RValue<Short4> operator&(RValue<Short4> lhs, RValue<Short4> rhs);\r
+       RValue<Short4> operator|(RValue<Short4> lhs, RValue<Short4> rhs);\r
+       RValue<Short4> operator^(RValue<Short4> lhs, RValue<Short4> rhs);\r
+       RValue<Short4> operator<<(RValue<Short4> lhs, unsigned char rhs);\r
+       RValue<Short4> operator>>(RValue<Short4> lhs, unsigned char rhs);\r
+       RValue<Short4> operator<<(RValue<Short4> lhs, RValue<Long1> rhs);\r
+       RValue<Short4> operator>>(RValue<Short4> lhs, RValue<Long1> rhs);\r
+       RValue<Short4> operator+=(const Short4 &lhs, RValue<Short4> rhs);\r
+       RValue<Short4> operator-=(const Short4 &lhs, RValue<Short4> rhs);\r
+       RValue<Short4> operator*=(const Short4 &lhs, RValue<Short4> rhs);\r
+//     RValue<Short4> operator/=(const Short4 &lhs, RValue<Short4> rhs);\r
+//     RValue<Short4> operator%=(const Short4 &lhs, RValue<Short4> rhs);\r
+       RValue<Short4> operator&=(const Short4 &lhs, RValue<Short4> rhs);\r
+       RValue<Short4> operator|=(const Short4 &lhs, RValue<Short4> rhs);\r
+       RValue<Short4> operator^=(const Short4 &lhs, RValue<Short4> rhs);\r
+       RValue<Short4> operator<<=(const Short4 &lhs, unsigned char rhs);\r
+       RValue<Short4> operator>>=(const Short4 &lhs, unsigned char rhs);\r
+       RValue<Short4> operator<<=(const Short4 &lhs, RValue<Long1> rhs);\r
+       RValue<Short4> operator>>=(const Short4 &lhs, RValue<Long1> rhs);\r
+//     RValue<Short4> operator+(RValue<Short4> val);\r
+       RValue<Short4> operator-(RValue<Short4> val);\r
+       RValue<Short4> operator~(RValue<Short4> val);\r
+//     RValue<Short4> operator++(const Short4 &val, int);   // Post-increment\r
+//     const Short4 &operator++(const Short4 &val);   // Pre-increment\r
+//     RValue<Short4> operator--(const Short4 &val, int);   // Post-decrement\r
+//     const Short4 &operator--(const Short4 &val);   // Pre-decrement\r
+//     RValue<Bool> operator<(RValue<Short4> lhs, RValue<Short4> rhs);\r
+//     RValue<Bool> operator<=(RValue<Short4> lhs, RValue<Short4> rhs);\r
+//     RValue<Bool> operator>(RValue<Short4> lhs, RValue<Short4> rhs);\r
+//     RValue<Bool> operator>=(RValue<Short4> lhs, RValue<Short4> rhs);\r
+//     RValue<Bool> operator!=(RValue<Short4> lhs, RValue<Short4> rhs);\r
+//     RValue<Bool> operator==(RValue<Short4> lhs, RValue<Short4> rhs);\r
+\r
+       RValue<Short4> RoundShort4(RValue<Float4> cast);\r
+       RValue<Short4> Max(RValue<Short4> x, RValue<Short4> y);\r
+       RValue<Short4> Min(RValue<Short4> x, RValue<Short4> y);\r
+       RValue<Short4> AddSat(RValue<Short4> x, RValue<Short4> y);\r
+       RValue<Short4> SubSat(RValue<Short4> x, RValue<Short4> y);\r
+       RValue<Short4> MulHigh(RValue<Short4> x, RValue<Short4> y);\r
+       RValue<Int2> MulAdd(RValue<Short4> x, RValue<Short4> y);\r
+       RValue<SByte8> Pack(RValue<Short4> x, RValue<Short4> y);\r
+       RValue<Int2> UnpackLow(RValue<Short4> x, RValue<Short4> y);\r
+       RValue<Int2> UnpackHigh(RValue<Short4> x, RValue<Short4> y);\r
+       RValue<Short4> Swizzle(RValue<Short4> x, unsigned char select);\r
+       RValue<Short4> Insert(RValue<Short4> val, RValue<Short> element, int i);\r
+       RValue<Short> Extract(RValue<Short4> val, int i);\r
+       RValue<Short4> CmpGT(RValue<Short4> x, RValue<Short4> y);\r
+       RValue<Short4> CmpEQ(RValue<Short4> x, RValue<Short4> y);\r
+\r
        class UShort4 : public Variable<UShort4>\r
        {\r
        public:\r
@@ -1003,51 +996,49 @@ namespace sw
                RValue<UShort4> operator=(const Short4 &rhs) const;\r
                RValue<UShort4> operator=(const Reference<Short4> &rhs) const;\r
 \r
-               friend RValue<UShort4> operator+(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
-               friend RValue<UShort4> operator-(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
-               friend RValue<UShort4> operator*(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
-       //      friend RValue<UShort4> operator/(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
-       //      friend RValue<UShort4> operator%(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
-       //      friend RValue<UShort4> operator&(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
-       //      friend RValue<UShort4> operator|(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
-       //      friend RValue<UShort4> operator^(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
-               friend RValue<UShort4> operator<<(RValue<UShort4> lhs, unsigned char rhs);\r
-               friend RValue<UShort4> operator>>(RValue<UShort4> lhs, unsigned char rhs);\r
-               friend RValue<UShort4> operator<<(RValue<UShort4> lhs, RValue<Long1> rhs);\r
-               friend RValue<UShort4> operator>>(RValue<UShort4> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<UShort4> operator+=(const UShort4 &lhs, RValue<UShort4> rhs);\r
-       //      friend RValue<UShort4> operator-=(const UShort4 &lhs, RValue<UShort4> rhs);\r
-       //      friend RValue<UShort4> operator*=(const UShort4 &lhs, RValue<UShort4> rhs);\r
-       //      friend RValue<UShort4> operator/=(const UShort4 &lhs, RValue<UShort4> rhs);\r
-       //      friend RValue<UShort4> operator%=(const UShort4 &lhs, RValue<UShort4> rhs);\r
-       //      friend RValue<UShort4> operator&=(const UShort4 &lhs, RValue<UShort4> rhs);\r
-       //      friend RValue<UShort4> operator|=(const UShort4 &lhs, RValue<UShort4> rhs);\r
-       //      friend RValue<UShort4> operator^=(const UShort4 &lhs, RValue<UShort4> rhs);\r
-               friend RValue<UShort4> operator<<=(const UShort4 &lhs, unsigned char rhs);\r
-               friend RValue<UShort4> operator>>=(const UShort4 &lhs, unsigned char rhs);\r
-               friend RValue<UShort4> operator<<=(const UShort4 &lhs, RValue<Long1> rhs);\r
-               friend RValue<UShort4> operator>>=(const UShort4 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<UShort4> operator+(RValue<UShort4> val);\r
-       //      friend RValue<UShort4> operator-(RValue<UShort4> val);\r
-               friend RValue<UShort4> operator~(RValue<UShort4> val);\r
-       //      friend RValue<UShort4> operator++(const UShort4 &val, int);   // Post-increment\r
-       //      friend const UShort4 &operator++(const UShort4 &val);   // Pre-increment\r
-       //      friend RValue<UShort4> operator--(const UShort4 &val, int);   // Post-decrement\r
-       //      friend const UShort4 &operator--(const UShort4 &val);   // Pre-decrement\r
-\r
-               friend RValue<UShort4> Max(RValue<UShort4> x, RValue<UShort4> y);\r
-               friend RValue<UShort4> Min(RValue<UShort4> x, RValue<UShort4> y);\r
-               friend RValue<UShort4> AddSat(RValue<UShort4> x, RValue<UShort4> y);\r
-               friend RValue<UShort4> SubSat(RValue<UShort4> x, RValue<UShort4> y);\r
-               friend RValue<UShort4> MulHigh(RValue<UShort4> x, RValue<UShort4> y);\r
-\r
-               friend RValue<UShort4> Average(RValue<UShort4> x, RValue<UShort4> y);\r
-\r
-               friend RValue<Byte8> Pack(RValue<UShort4> x, RValue<UShort4> y);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+       RValue<UShort4> operator+(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
+       RValue<UShort4> operator-(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
+       RValue<UShort4> operator*(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
+//     RValue<UShort4> operator/(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
+//     RValue<UShort4> operator%(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
+//     RValue<UShort4> operator&(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
+//     RValue<UShort4> operator|(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
+//     RValue<UShort4> operator^(RValue<UShort4> lhs, RValue<UShort4> rhs);\r
+       RValue<UShort4> operator<<(RValue<UShort4> lhs, unsigned char rhs);\r
+       RValue<UShort4> operator>>(RValue<UShort4> lhs, unsigned char rhs);\r
+       RValue<UShort4> operator<<(RValue<UShort4> lhs, RValue<Long1> rhs);\r
+       RValue<UShort4> operator>>(RValue<UShort4> lhs, RValue<Long1> rhs);\r
+//     RValue<UShort4> operator+=(const UShort4 &lhs, RValue<UShort4> rhs);\r
+//     RValue<UShort4> operator-=(const UShort4 &lhs, RValue<UShort4> rhs);\r
+//     RValue<UShort4> operator*=(const UShort4 &lhs, RValue<UShort4> rhs);\r
+//     RValue<UShort4> operator/=(const UShort4 &lhs, RValue<UShort4> rhs);\r
+//     RValue<UShort4> operator%=(const UShort4 &lhs, RValue<UShort4> rhs);\r
+//     RValue<UShort4> operator&=(const UShort4 &lhs, RValue<UShort4> rhs);\r
+//     RValue<UShort4> operator|=(const UShort4 &lhs, RValue<UShort4> rhs);\r
+//     RValue<UShort4> operator^=(const UShort4 &lhs, RValue<UShort4> rhs);\r
+       RValue<UShort4> operator<<=(const UShort4 &lhs, unsigned char rhs);\r
+       RValue<UShort4> operator>>=(const UShort4 &lhs, unsigned char rhs);\r
+       RValue<UShort4> operator<<=(const UShort4 &lhs, RValue<Long1> rhs);\r
+       RValue<UShort4> operator>>=(const UShort4 &lhs, RValue<Long1> rhs);\r
+//     RValue<UShort4> operator+(RValue<UShort4> val);\r
+//     RValue<UShort4> operator-(RValue<UShort4> val);\r
+       RValue<UShort4> operator~(RValue<UShort4> val);\r
+//     RValue<UShort4> operator++(const UShort4 &val, int);   // Post-increment\r
+//     const UShort4 &operator++(const UShort4 &val);   // Pre-increment\r
+//     RValue<UShort4> operator--(const UShort4 &val, int);   // Post-decrement\r
+//     const UShort4 &operator--(const UShort4 &val);   // Pre-decrement\r
+\r
+       RValue<UShort4> Max(RValue<UShort4> x, RValue<UShort4> y);\r
+       RValue<UShort4> Min(RValue<UShort4> x, RValue<UShort4> y);\r
+       RValue<UShort4> AddSat(RValue<UShort4> x, RValue<UShort4> y);\r
+       RValue<UShort4> SubSat(RValue<UShort4> x, RValue<UShort4> y);\r
+       RValue<UShort4> MulHigh(RValue<UShort4> x, RValue<UShort4> y);\r
+       RValue<UShort4> Average(RValue<UShort4> x, RValue<UShort4> y);\r
+       RValue<Byte8> Pack(RValue<UShort4> x, RValue<UShort4> y);\r
+\r
        class Short8 : public Variable<Short8>\r
        {\r
        public:\r
@@ -1061,50 +1052,49 @@ namespace sw
        //      RValue<Short8> operator=(const Short8 &rhs) const;\r
        //      RValue<Short8> operator=(const Reference<Short8> &rhs) const;\r
 \r
-               friend RValue<Short8> operator+(RValue<Short8> lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator-(RValue<Short8> lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator*(RValue<Short8> lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator/(RValue<Short8> lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator%(RValue<Short8> lhs, RValue<Short8> rhs);\r
-               friend RValue<Short8> operator&(RValue<Short8> lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator|(RValue<Short8> lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator^(RValue<Short8> lhs, RValue<Short8> rhs);\r
-               friend RValue<Short8> operator<<(RValue<Short8> lhs, unsigned char rhs);\r
-               friend RValue<Short8> operator>>(RValue<Short8> lhs, unsigned char rhs);\r
-       //      friend RValue<Short8> operator<<(RValue<Short8> lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator>>(RValue<Short8> lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator+=(const Short8 &lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator-=(const Short8 &lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator*=(const Short8 &lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator/=(const Short8 &lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator%=(const Short8 &lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator&=(const Short8 &lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator|=(const Short8 &lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator^=(const Short8 &lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator<<=(const Short8 &lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator>>=(const Short8 &lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Short8> operator+(RValue<Short8> val);\r
-       //      friend RValue<Short8> operator-(RValue<Short8> val);\r
-       //      friend RValue<Short8> operator~(RValue<Short8> val);\r
-       //      friend RValue<Short8> operator++(const Short8 &val, int);   // Post-increment\r
-       //      friend const Short8 &operator++(const Short8 &val);   // Pre-increment\r
-       //      friend RValue<Short8> operator--(const Short8 &val, int);   // Post-decrement\r
-       //      friend const Short8 &operator--(const Short8 &val);   // Pre-decrement\r
-       //      friend RValue<Bool> operator<(RValue<Short8> lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Bool> operator<=(RValue<Short8> lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Bool> operator>(RValue<Short8> lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Bool> operator>=(RValue<Short8> lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Bool> operator!=(RValue<Short8> lhs, RValue<Short8> rhs);\r
-       //      friend RValue<Bool> operator==(RValue<Short8> lhs, RValue<Short8> rhs);\r
-\r
-               friend RValue<Short8> Concatenate(RValue<Short4> lo, RValue<Short4> hi);\r
-\r
-               friend RValue<Short8> MulHigh(RValue<Short8> x, RValue<Short8> y);\r
-               friend RValue<Int4> MulAdd(RValue<Short8> x, RValue<Short8> y);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+       RValue<Short8> operator+(RValue<Short8> lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator-(RValue<Short8> lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator*(RValue<Short8> lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator/(RValue<Short8> lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator%(RValue<Short8> lhs, RValue<Short8> rhs);\r
+       RValue<Short8> operator&(RValue<Short8> lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator|(RValue<Short8> lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator^(RValue<Short8> lhs, RValue<Short8> rhs);\r
+       RValue<Short8> operator<<(RValue<Short8> lhs, unsigned char rhs);\r
+       RValue<Short8> operator>>(RValue<Short8> lhs, unsigned char rhs);\r
+//     RValue<Short8> operator<<(RValue<Short8> lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator>>(RValue<Short8> lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator+=(const Short8 &lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator-=(const Short8 &lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator*=(const Short8 &lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator/=(const Short8 &lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator%=(const Short8 &lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator&=(const Short8 &lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator|=(const Short8 &lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator^=(const Short8 &lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator<<=(const Short8 &lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator>>=(const Short8 &lhs, RValue<Short8> rhs);\r
+//     RValue<Short8> operator+(RValue<Short8> val);\r
+//     RValue<Short8> operator-(RValue<Short8> val);\r
+//     RValue<Short8> operator~(RValue<Short8> val);\r
+//     RValue<Short8> operator++(const Short8 &val, int);   // Post-increment\r
+//     const Short8 &operator++(const Short8 &val);   // Pre-increment\r
+//     RValue<Short8> operator--(const Short8 &val, int);   // Post-decrement\r
+//     const Short8 &operator--(const Short8 &val);   // Pre-decrement\r
+//     RValue<Bool> operator<(RValue<Short8> lhs, RValue<Short8> rhs);\r
+//     RValue<Bool> operator<=(RValue<Short8> lhs, RValue<Short8> rhs);\r
+//     RValue<Bool> operator>(RValue<Short8> lhs, RValue<Short8> rhs);\r
+//     RValue<Bool> operator>=(RValue<Short8> lhs, RValue<Short8> rhs);\r
+//     RValue<Bool> operator!=(RValue<Short8> lhs, RValue<Short8> rhs);\r
+//     RValue<Bool> operator==(RValue<Short8> lhs, RValue<Short8> rhs);\r
+\r
+       RValue<Short8> Concatenate(RValue<Short4> lo, RValue<Short4> hi);\r
+       RValue<Short8> MulHigh(RValue<Short8> x, RValue<Short8> y);\r
+       RValue<Int4> MulAdd(RValue<Short8> x, RValue<Short8> y);\r
+\r
        class UShort8 : public Variable<UShort8>\r
        {\r
        public:\r
@@ -1118,50 +1108,49 @@ namespace sw
                RValue<UShort8> operator=(const UShort8 &rhs) const;\r
                RValue<UShort8> operator=(const Reference<UShort8> &rhs) const;\r
 \r
-               friend RValue<UShort8> operator+(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator-(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-               friend RValue<UShort8> operator*(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator/(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator%(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-               friend RValue<UShort8> operator&(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator|(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator^(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-               friend RValue<UShort8> operator<<(RValue<UShort8> lhs, unsigned char rhs);\r
-               friend RValue<UShort8> operator>>(RValue<UShort8> lhs, unsigned char rhs);\r
-       //      friend RValue<UShort8> operator<<(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator>>(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-               friend RValue<UShort8> operator+=(const UShort8 &lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator-=(const UShort8 &lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator*=(const UShort8 &lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator/=(const UShort8 &lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator%=(const UShort8 &lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator&=(const UShort8 &lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator|=(const UShort8 &lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator^=(const UShort8 &lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator<<=(const UShort8 &lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator>>=(const UShort8 &lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<UShort8> operator+(RValue<UShort8> val);\r
-       //      friend RValue<UShort8> operator-(RValue<UShort8> val);\r
-               friend RValue<UShort8> operator~(RValue<UShort8> val);\r
-       //      friend RValue<UShort8> operator++(const UShort8 &val, int);   // Post-increment\r
-       //      friend const UShort8 &operator++(const UShort8 &val);   // Pre-increment\r
-       //      friend RValue<UShort8> operator--(const UShort8 &val, int);   // Post-decrement\r
-       //      friend const UShort8 &operator--(const UShort8 &val);   // Pre-decrement\r
-       //      friend RValue<Bool> operator<(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<Bool> operator<=(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<Bool> operator>(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<Bool> operator>=(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<Bool> operator!=(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-       //      friend RValue<Bool> operator==(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
-\r
-               friend RValue<UShort8> Swizzle(RValue<UShort8> x, char select0, char select1, char select2, char select3, char select4, char select5, char select6, char select7);\r
-               friend RValue<UShort8> Concatenate(RValue<UShort4> lo, RValue<UShort4> hi);\r
-\r
-               friend RValue<UShort8> MulHigh(RValue<UShort8> x, RValue<UShort8> y);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+       RValue<UShort8> operator+(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator-(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+       RValue<UShort8> operator*(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator/(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator%(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+       RValue<UShort8> operator&(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator|(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator^(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+       RValue<UShort8> operator<<(RValue<UShort8> lhs, unsigned char rhs);\r
+       RValue<UShort8> operator>>(RValue<UShort8> lhs, unsigned char rhs);\r
+//     RValue<UShort8> operator<<(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator>>(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+       RValue<UShort8> operator+=(const UShort8 &lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator-=(const UShort8 &lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator*=(const UShort8 &lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator/=(const UShort8 &lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator%=(const UShort8 &lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator&=(const UShort8 &lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator|=(const UShort8 &lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator^=(const UShort8 &lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator<<=(const UShort8 &lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator>>=(const UShort8 &lhs, RValue<UShort8> rhs);\r
+//     RValue<UShort8> operator+(RValue<UShort8> val);\r
+//     RValue<UShort8> operator-(RValue<UShort8> val);\r
+       RValue<UShort8> operator~(RValue<UShort8> val);\r
+//     RValue<UShort8> operator++(const UShort8 &val, int);   // Post-increment\r
+//     const UShort8 &operator++(const UShort8 &val);   // Pre-increment\r
+//     RValue<UShort8> operator--(const UShort8 &val, int);   // Post-decrement\r
+//     const UShort8 &operator--(const UShort8 &val);   // Pre-decrement\r
+//     RValue<Bool> operator<(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+//     RValue<Bool> operator<=(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+//     RValue<Bool> operator>(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+//     RValue<Bool> operator>=(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+//     RValue<Bool> operator!=(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+//     RValue<Bool> operator==(RValue<UShort8> lhs, RValue<UShort8> rhs);\r
+\r
+    RValue<UShort8> Swizzle(RValue<UShort8> x, char select0, char select1, char select2, char select3, char select4, char select5, char select6, char select7);\r
+       RValue<UShort8> Concatenate(RValue<UShort4> lo, RValue<UShort4> hi);\r
+    RValue<UShort8> MulHigh(RValue<UShort8> x, RValue<UShort8> y);\r
+\r
        class Int : public Variable<Int>\r
        {\r
        public:\r
@@ -1192,49 +1181,48 @@ namespace sw
                RValue<Int> operator=(const Reference<Int> &rhs) const;\r
                RValue<Int> operator=(const Reference<UInt> &rhs) const;\r
 \r
-               friend RValue<Int> operator+(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator-(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator*(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator/(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator%(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator&(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator|(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator^(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator<<(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator>>(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator+=(const Int &lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator-=(const Int &lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator*=(const Int &lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator/=(const Int &lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator%=(const Int &lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator&=(const Int &lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator|=(const Int &lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator^=(const Int &lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator<<=(const Int &lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator>>=(const Int &lhs, RValue<Int> rhs);\r
-               friend RValue<Int> operator+(RValue<Int> val);\r
-               friend RValue<Int> operator-(RValue<Int> val);\r
-               friend RValue<Int> operator~(RValue<Int> val);\r
-               friend RValue<Int> operator++(const Int &val, int);   // Post-increment\r
-               friend const Int &operator++(const Int &val);   // Pre-increment\r
-               friend RValue<Int> operator--(const Int &val, int);   // Post-decrement\r
-               friend const Int &operator--(const Int &val);   // Pre-decrement\r
-               friend RValue<Bool> operator<(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Bool> operator<=(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Bool> operator>(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Bool> operator>=(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Bool> operator!=(RValue<Int> lhs, RValue<Int> rhs);\r
-               friend RValue<Bool> operator==(RValue<Int> lhs, RValue<Int> rhs);\r
-\r
-               friend RValue<Int> Max(RValue<Int> x, RValue<Int> y);\r
-               friend RValue<Int> Min(RValue<Int> x, RValue<Int> y);\r
-               friend RValue<Int> Clamp(RValue<Int> x, RValue<Int> min, RValue<Int> max);\r
-\r
-               friend RValue<Int> RoundInt(RValue<Float> cast);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+       RValue<Int> operator+(RValue<Int> lhs, RValue<Int> rhs);\r
+    RValue<Int> operator-(RValue<Int> lhs, RValue<Int> rhs);\r
+       RValue<Int> operator*(RValue<Int> lhs, RValue<Int> rhs);\r
+       RValue<Int> operator/(RValue<Int> lhs, RValue<Int> rhs);\r
+       RValue<Int> operator%(RValue<Int> lhs, RValue<Int> rhs);\r
+       RValue<Int> operator&(RValue<Int> lhs, RValue<Int> rhs);\r
+       RValue<Int> operator|(RValue<Int> lhs, RValue<Int> rhs);\r
+       RValue<Int> operator^(RValue<Int> lhs, RValue<Int> rhs);\r
+       RValue<Int> operator<<(RValue<Int> lhs, RValue<Int> rhs);\r
+       RValue<Int> operator>>(RValue<Int> lhs, RValue<Int> rhs);\r
+       RValue<Int> operator+=(const Int &lhs, RValue<Int> rhs);\r
+       RValue<Int> operator-=(const Int &lhs, RValue<Int> rhs);\r
+       RValue<Int> operator*=(const Int &lhs, RValue<Int> rhs);\r
+       RValue<Int> operator/=(const Int &lhs, RValue<Int> rhs);\r
+       RValue<Int> operator%=(const Int &lhs, RValue<Int> rhs);\r
+       RValue<Int> operator&=(const Int &lhs, RValue<Int> rhs);\r
+       RValue<Int> operator|=(const Int &lhs, RValue<Int> rhs);\r
+       RValue<Int> operator^=(const Int &lhs, RValue<Int> rhs);\r
+       RValue<Int> operator<<=(const Int &lhs, RValue<Int> rhs);\r
+       RValue<Int> operator>>=(const Int &lhs, RValue<Int> rhs);\r
+       RValue<Int> operator+(RValue<Int> val);\r
+       RValue<Int> operator-(RValue<Int> val);\r
+       RValue<Int> operator~(RValue<Int> val);\r
+       RValue<Int> operator++(const Int &val, int);   // Post-increment\r
+       const Int &operator++(const Int &val);   // Pre-increment\r
+       RValue<Int> operator--(const Int &val, int);   // Post-decrement\r
+       const Int &operator--(const Int &val);   // Pre-decrement\r
+       RValue<Bool> operator<(RValue<Int> lhs, RValue<Int> rhs);\r
+       RValue<Bool> operator<=(RValue<Int> lhs, RValue<Int> rhs);\r
+       RValue<Bool> operator>(RValue<Int> lhs, RValue<Int> rhs);\r
+       RValue<Bool> operator>=(RValue<Int> lhs, RValue<Int> rhs);\r
+       RValue<Bool> operator!=(RValue<Int> lhs, RValue<Int> rhs);\r
+       RValue<Bool> operator==(RValue<Int> lhs, RValue<Int> rhs);\r
+\r
+       RValue<Int> Max(RValue<Int> x, RValue<Int> y);\r
+       RValue<Int> Min(RValue<Int> x, RValue<Int> y);\r
+       RValue<Int> Clamp(RValue<Int> x, RValue<Int> min, RValue<Int> max);\r
+    RValue<Int> RoundInt(RValue<Float> cast);\r
+\r
        class Long : public Variable<Long>\r
        {\r
        public:\r
@@ -1263,47 +1251,46 @@ namespace sw
        //      RValue<Long> operator=(const ULong &rhs) const;\r
        //      RValue<Long> operator=(const Reference<ULong> &rhs) const;\r
 \r
-               friend RValue<Long> operator+(RValue<Long> lhs, RValue<Long> rhs);\r
-               friend RValue<Long> operator-(RValue<Long> lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator*(RValue<Long> lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator/(RValue<Long> lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator%(RValue<Long> lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator&(RValue<Long> lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator|(RValue<Long> lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator^(RValue<Long> lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator<<(RValue<Long> lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator>>(RValue<Long> lhs, RValue<Long> rhs);\r
-               friend RValue<Long> operator+=(const Long &lhs, RValue<Long> rhs);\r
-               friend RValue<Long> operator-=(const Long &lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator*=(const Long &lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator/=(const Long &lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator%=(const Long &lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator&=(const Long &lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator|=(const Long &lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator^=(const Long &lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator<<=(const Long &lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator>>=(const Long &lhs, RValue<Long> rhs);\r
-       //      friend RValue<Long> operator+(RValue<Long> val);\r
-       //      friend RValue<Long> operator-(RValue<Long> val);\r
-       //      friend RValue<Long> operator~(RValue<Long> val);\r
-       //      friend RValue<Long> operator++(const Long &val, int);   // Post-increment\r
-       //      friend const Long &operator++(const Long &val);   // Pre-increment\r
-       //      friend RValue<Long> operator--(const Long &val, int);   // Post-decrement\r
-       //      friend const Long &operator--(const Long &val);   // Pre-decrement\r
-       //      friend RValue<Bool> operator<(RValue<Long> lhs, RValue<Long> rhs);\r
-       //      friend RValue<Bool> operator<=(RValue<Long> lhs, RValue<Long> rhs);\r
-       //      friend RValue<Bool> operator>(RValue<Long> lhs, RValue<Long> rhs);\r
-       //      friend RValue<Bool> operator>=(RValue<Long> lhs, RValue<Long> rhs);\r
-       //      friend RValue<Bool> operator!=(RValue<Long> lhs, RValue<Long> rhs);\r
-       //      friend RValue<Bool> operator==(RValue<Long> lhs, RValue<Long> rhs);\r
-\r
-       //      friend RValue<Long> RoundLong(RValue<Float> cast);\r
-\r
-               friend RValue<Long> AddAtomic( RValue<Pointer<Long> > x, RValue<Long> y);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+       RValue<Long> operator+(RValue<Long> lhs, RValue<Long> rhs);\r
+       RValue<Long> operator-(RValue<Long> lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator*(RValue<Long> lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator/(RValue<Long> lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator%(RValue<Long> lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator&(RValue<Long> lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator|(RValue<Long> lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator^(RValue<Long> lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator<<(RValue<Long> lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator>>(RValue<Long> lhs, RValue<Long> rhs);\r
+       RValue<Long> operator+=(const Long &lhs, RValue<Long> rhs);\r
+       RValue<Long> operator-=(const Long &lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator*=(const Long &lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator/=(const Long &lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator%=(const Long &lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator&=(const Long &lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator|=(const Long &lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator^=(const Long &lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator<<=(const Long &lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator>>=(const Long &lhs, RValue<Long> rhs);\r
+//     RValue<Long> operator+(RValue<Long> val);\r
+//     RValue<Long> operator-(RValue<Long> val);\r
+//     RValue<Long> operator~(RValue<Long> val);\r
+//     RValue<Long> operator++(const Long &val, int);   // Post-increment\r
+//     const Long &operator++(const Long &val);   // Pre-increment\r
+//     RValue<Long> operator--(const Long &val, int);   // Post-decrement\r
+//     const Long &operator--(const Long &val);   // Pre-decrement\r
+//     RValue<Bool> operator<(RValue<Long> lhs, RValue<Long> rhs);\r
+//     RValue<Bool> operator<=(RValue<Long> lhs, RValue<Long> rhs);\r
+//     RValue<Bool> operator>(RValue<Long> lhs, RValue<Long> rhs);\r
+//     RValue<Bool> operator>=(RValue<Long> lhs, RValue<Long> rhs);\r
+//     RValue<Bool> operator!=(RValue<Long> lhs, RValue<Long> rhs);\r
+//     RValue<Bool> operator==(RValue<Long> lhs, RValue<Long> rhs);\r
+\r
+//     RValue<Long> RoundLong(RValue<Float> cast);\r
+    RValue<Long> AddAtomic( RValue<Pointer<Long> > x, RValue<Long> y);\r
+\r
        class Long1 : public Variable<Long1>\r
        {\r
        public:\r
@@ -1334,45 +1321,46 @@ namespace sw
        //      RValue<Long1> operator=(const ULong1 &rhs) const;\r
        //      RValue<Long1> operator=(const Reference<ULong1> &rhs) const;\r
 \r
-       //      friend RValue<Long1> operator+(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator-(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator*(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator/(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator%(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator&(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator|(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator^(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator<<(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator>>(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator+=(const Long1 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator-=(const Long1 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator*=(const Long1 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator/=(const Long1 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator%=(const Long1 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator&=(const Long1 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator|=(const Long1 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator^=(const Long1 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator<<=(const Long1 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator>>=(const Long1 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long1> operator+(RValue<Long1> val);\r
-       //      friend RValue<Long1> operator-(RValue<Long1> val);\r
-       //      friend RValue<Long1> operator~(RValue<Long1> val);\r
-       //      friend RValue<Long1> operator++(const Long1 &val, int);   // Post-increment\r
-       //      friend const Long1 &operator++(const Long1 &val);   // Pre-increment\r
-       //      friend RValue<Long1> operator--(const Long1 &val, int);   // Post-decrement\r
-       //      friend const Long1 &operator--(const Long1 &val);   // Pre-decrement\r
-       //      friend RValue<Bool> operator<(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Bool> operator<=(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Bool> operator>(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Bool> operator>=(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Bool> operator!=(RValue<Long1> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Bool> operator==(RValue<Long1> lhs, RValue<Long1> rhs);\r
-\r
-       //      friend RValue<Long1> RoundLong1(RValue<Float> cast);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+//     RValue<Long1> operator+(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator-(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator*(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator/(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator%(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator&(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator|(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator^(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator<<(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator>>(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator+=(const Long1 &lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator-=(const Long1 &lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator*=(const Long1 &lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator/=(const Long1 &lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator%=(const Long1 &lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator&=(const Long1 &lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator|=(const Long1 &lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator^=(const Long1 &lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator<<=(const Long1 &lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator>>=(const Long1 &lhs, RValue<Long1> rhs);\r
+//     RValue<Long1> operator+(RValue<Long1> val);\r
+//     RValue<Long1> operator-(RValue<Long1> val);\r
+//     RValue<Long1> operator~(RValue<Long1> val);\r
+//     RValue<Long1> operator++(const Long1 &val, int);   // Post-increment\r
+//     const Long1 &operator++(const Long1 &val);   // Pre-increment\r
+//     RValue<Long1> operator--(const Long1 &val, int);   // Post-decrement\r
+//     const Long1 &operator--(const Long1 &val);   // Pre-decrement\r
+//     RValue<Bool> operator<(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Bool> operator<=(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Bool> operator>(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Bool> operator>=(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Bool> operator!=(RValue<Long1> lhs, RValue<Long1> rhs);\r
+//     RValue<Bool> operator==(RValue<Long1> lhs, RValue<Long1> rhs);\r
+\r
+\r
+//     RValue<Long1> RoundLong1(RValue<Float> cast);\r
+\r
        class Long2 : public Variable<Long2>\r
        {\r
        public:\r
@@ -1389,54 +1377,53 @@ namespace sw
        //      RValue<Long2> operator=(const Long2 &rhs) const;\r
        //      RValue<Long2> operator=(const Reference<Long2 &rhs) const;\r
 \r
-       //      friend RValue<Long2> operator+(RValue<Long2> lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator-(RValue<Long2> lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator*(RValue<Long2> lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator/(RValue<Long2> lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator%(RValue<Long2> lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator&(RValue<Long2> lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator|(RValue<Long2> lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator^(RValue<Long2> lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator<<(RValue<Long2> lhs, unsigned char rhs);\r
-       //      friend RValue<Long2> operator>>(RValue<Long2> lhs, unsigned char rhs);\r
-       //      friend RValue<Long2> operator<<(RValue<Long2> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long2> operator>>(RValue<Long2> lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long2> operator+=(const Long2 &lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator-=(const Long2 &lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator*=(const Long2 &lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator/=(const Long2 &lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator%=(const Long2 &lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator&=(const Long2 &lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator|=(const Long2 &lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator^=(const Long2 &lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Long2> operator<<=(const Long2 &lhs, unsigned char rhs);\r
-       //      friend RValue<Long2> operator>>=(const Long2 &lhs, unsigned char rhs);\r
-       //      friend RValue<Long2> operator<<=(const Long2 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long2> operator>>=(const Long2 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Long2> operator+(RValue<Long2> val);\r
-       //      friend RValue<Long2> operator-(RValue<Long2> val);\r
-       //      friend RValue<Long2> operator~(RValue<Long2> val);\r
-       //      friend RValue<Long2> operator++(const Long2 &val, int);   // Post-increment\r
-       //      friend const Long2 &operator++(const Long2 &val);   // Pre-increment\r
-       //      friend RValue<Long2> operator--(const Long2 &val, int);   // Post-decrement\r
-       //      friend const Long2 &operator--(const Long2 &val);   // Pre-decrement\r
-       //      friend RValue<Bool> operator<(RValue<Long2> lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Bool> operator<=(RValue<Long2> lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Bool> operator>(RValue<Long2> lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Bool> operator>=(RValue<Long2> lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Bool> operator!=(RValue<Long2> lhs, RValue<Long2> rhs);\r
-       //      friend RValue<Bool> operator==(RValue<Long2> lhs, RValue<Long2> rhs);\r
-\r
-       //      friend RValue<Long2> RoundInt(RValue<Float4> cast);\r
-\r
-       //      friend RValue<Long2> UnpackLow(RValue<Long2> x, RValue<Long2> y);\r
-               friend RValue<Long2> UnpackHigh(RValue<Long2> x, RValue<Long2> y);\r
-       //      friend RValue<Int> Extract(RValue<Long2> val, int i);\r
-       //      friend RValue<Long2> Insert(RValue<Long2> val, RValue<Int> element, int i);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+//     RValue<Long2> operator+(RValue<Long2> lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator-(RValue<Long2> lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator*(RValue<Long2> lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator/(RValue<Long2> lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator%(RValue<Long2> lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator&(RValue<Long2> lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator|(RValue<Long2> lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator^(RValue<Long2> lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator<<(RValue<Long2> lhs, unsigned char rhs);\r
+//     RValue<Long2> operator>>(RValue<Long2> lhs, unsigned char rhs);\r
+//     RValue<Long2> operator<<(RValue<Long2> lhs, RValue<Long1> rhs);\r
+//     RValue<Long2> operator>>(RValue<Long2> lhs, RValue<Long1> rhs);\r
+//     RValue<Long2> operator+=(const Long2 &lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator-=(const Long2 &lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator*=(const Long2 &lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator/=(const Long2 &lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator%=(const Long2 &lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator&=(const Long2 &lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator|=(const Long2 &lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator^=(const Long2 &lhs, RValue<Long2> rhs);\r
+//     RValue<Long2> operator<<=(const Long2 &lhs, unsigned char rhs);\r
+//     RValue<Long2> operator>>=(const Long2 &lhs, unsigned char rhs);\r
+//     RValue<Long2> operator<<=(const Long2 &lhs, RValue<Long1> rhs);\r
+//     RValue<Long2> operator>>=(const Long2 &lhs, RValue<Long1> rhs);\r
+//     RValue<Long2> operator+(RValue<Long2> val);\r
+//     RValue<Long2> operator-(RValue<Long2> val);\r
+//     RValue<Long2> operator~(RValue<Long2> val);\r
+//     RValue<Long2> operator++(const Long2 &val, int);   // Post-increment\r
+//     const Long2 &operator++(const Long2 &val);   // Pre-increment\r
+//     RValue<Long2> operator--(const Long2 &val, int);   // Post-decrement\r
+//     const Long2 &operator--(const Long2 &val);   // Pre-decrement\r
+//     RValue<Bool> operator<(RValue<Long2> lhs, RValue<Long2> rhs);\r
+//     RValue<Bool> operator<=(RValue<Long2> lhs, RValue<Long2> rhs);\r
+//     RValue<Bool> operator>(RValue<Long2> lhs, RValue<Long2> rhs);\r
+//     RValue<Bool> operator>=(RValue<Long2> lhs, RValue<Long2> rhs);\r
+//     RValue<Bool> operator!=(RValue<Long2> lhs, RValue<Long2> rhs);\r
+//     RValue<Bool> operator==(RValue<Long2> lhs, RValue<Long2> rhs);\r
+\r
+//     RValue<Long2> RoundInt(RValue<Float4> cast);\r
+//     RValue<Long2> UnpackLow(RValue<Long2> x, RValue<Long2> y);\r
+       RValue<Long2> UnpackHigh(RValue<Long2> x, RValue<Long2> y);\r
+//     RValue<Int> Extract(RValue<Long2> val, int i);\r
+//     RValue<Long2> Insert(RValue<Long2> val, RValue<Int> element, int i);\r
+\r
        class UInt : public Variable<UInt>\r
        {\r
        public:\r
@@ -1464,49 +1451,48 @@ namespace sw
                RValue<UInt> operator=(const Reference<UInt> &rhs) const;\r
                RValue<UInt> operator=(const Reference<Int> &rhs) const;\r
 \r
-               friend RValue<UInt> operator+(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator-(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator*(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator/(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator%(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator&(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator|(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator^(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator<<(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator>>(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator+=(const UInt &lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator-=(const UInt &lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator*=(const UInt &lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator/=(const UInt &lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator%=(const UInt &lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator&=(const UInt &lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator|=(const UInt &lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator^=(const UInt &lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator<<=(const UInt &lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator>>=(const UInt &lhs, RValue<UInt> rhs);\r
-               friend RValue<UInt> operator+(RValue<UInt> val);\r
-               friend RValue<UInt> operator-(RValue<UInt> val);\r
-               friend RValue<UInt> operator~(RValue<UInt> val);\r
-               friend RValue<UInt> operator++(const UInt &val, int);   // Post-increment\r
-               friend const UInt &operator++(const UInt &val);   // Pre-increment\r
-               friend RValue<UInt> operator--(const UInt &val, int);   // Post-decrement\r
-               friend const UInt &operator--(const UInt &val);   // Pre-decrement\r
-               friend RValue<Bool> operator<(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<Bool> operator<=(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<Bool> operator>(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<Bool> operator>=(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<Bool> operator!=(RValue<UInt> lhs, RValue<UInt> rhs);\r
-               friend RValue<Bool> operator==(RValue<UInt> lhs, RValue<UInt> rhs);\r
-\r
-               friend RValue<UInt> Max(RValue<UInt> x, RValue<UInt> y);\r
-               friend RValue<UInt> Min(RValue<UInt> x, RValue<UInt> y);\r
-               friend RValue<UInt> Clamp(RValue<UInt> x, RValue<UInt> min, RValue<UInt> max);\r
-\r
-       //      friend RValue<UInt> RoundUInt(RValue<Float> cast);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+       RValue<UInt> operator+(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator-(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator*(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator/(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator%(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator&(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator|(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator^(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator<<(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator>>(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator+=(const UInt &lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator-=(const UInt &lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator*=(const UInt &lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator/=(const UInt &lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator%=(const UInt &lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator&=(const UInt &lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator|=(const UInt &lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator^=(const UInt &lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator<<=(const UInt &lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator>>=(const UInt &lhs, RValue<UInt> rhs);\r
+       RValue<UInt> operator+(RValue<UInt> val);\r
+       RValue<UInt> operator-(RValue<UInt> val);\r
+       RValue<UInt> operator~(RValue<UInt> val);\r
+       RValue<UInt> operator++(const UInt &val, int);   // Post-increment\r
+       const UInt &operator++(const UInt &val);   // Pre-increment\r
+       RValue<UInt> operator--(const UInt &val, int);   // Post-decrement\r
+       const UInt &operator--(const UInt &val);   // Pre-decrement\r
+       RValue<Bool> operator<(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<Bool> operator<=(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<Bool> operator>(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<Bool> operator>=(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<Bool> operator!=(RValue<UInt> lhs, RValue<UInt> rhs);\r
+       RValue<Bool> operator==(RValue<UInt> lhs, RValue<UInt> rhs);\r
+\r
+       RValue<UInt> Max(RValue<UInt> x, RValue<UInt> y);\r
+       RValue<UInt> Min(RValue<UInt> x, RValue<UInt> y);\r
+       RValue<UInt> Clamp(RValue<UInt> x, RValue<UInt> min, RValue<UInt> max);\r
+//     RValue<UInt> RoundUInt(RValue<Float> cast);\r
+\r
        class Int2 : public Variable<Int2>\r
        {\r
        public:\r
@@ -1523,54 +1509,54 @@ namespace sw
                RValue<Int2> operator=(const Int2 &rhs) const;\r
                RValue<Int2> operator=(const Reference<Int2> &rhs) const;\r
 \r
-               friend RValue<Int2> operator+(RValue<Int2> lhs, RValue<Int2> rhs);\r
-               friend RValue<Int2> operator-(RValue<Int2> lhs, RValue<Int2> rhs);\r
-       //      friend RValue<Int2> operator*(RValue<Int2> lhs, RValue<Int2> rhs);\r
-       //      friend RValue<Int2> operator/(RValue<Int2> lhs, RValue<Int2> rhs);\r
-       //      friend RValue<Int2> operator%(RValue<Int2> lhs, RValue<Int2> rhs);\r
-               friend RValue<Int2> operator&(RValue<Int2> lhs, RValue<Int2> rhs);\r
-               friend RValue<Int2> operator|(RValue<Int2> lhs, RValue<Int2> rhs);\r
-               friend RValue<Int2> operator^(RValue<Int2> lhs, RValue<Int2> rhs);\r
-               friend RValue<Int2> operator<<(RValue<Int2> lhs, unsigned char rhs);\r
-               friend RValue<Int2> operator>>(RValue<Int2> lhs, unsigned char rhs);\r
-               friend RValue<Int2> operator<<(RValue<Int2> lhs, RValue<Long1> rhs);\r
-               friend RValue<Int2> operator>>(RValue<Int2> lhs, RValue<Long1> rhs);\r
-               friend RValue<Int2> operator+=(const Int2 &lhs, RValue<Int2> rhs);\r
-               friend RValue<Int2> operator-=(const Int2 &lhs, RValue<Int2> rhs);\r
-       //      friend RValue<Int2> operator*=(const Int2 &lhs, RValue<Int2> rhs);\r
-       //      friend RValue<Int2> operator/=(const Int2 &lhs, RValue<Int2> rhs);\r
-       //      friend RValue<Int2> operator%=(const Int2 &lhs, RValue<Int2> rhs);\r
-               friend RValue<Int2> operator&=(const Int2 &lhs, RValue<Int2> rhs);\r
-               friend RValue<Int2> operator|=(const Int2 &lhs, RValue<Int2> rhs);\r
-               friend RValue<Int2> operator^=(const Int2 &lhs, RValue<Int2> rhs);\r
-               friend RValue<Int2> operator<<=(const Int2 &lhs, unsigned char rhs);\r
-               friend RValue<Int2> operator>>=(const Int2 &lhs, unsigned char rhs);\r
-               friend RValue<Int2> operator<<=(const Int2 &lhs, RValue<Long1> rhs);\r
-               friend RValue<Int2> operator>>=(const Int2 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<Int2> operator+(RValue<Int2> val);\r
-       //      friend RValue<Int2> operator-(RValue<Int2> val);\r
-               friend RValue<Int2> operator~(RValue<Int2> val);\r
-       //      friend RValue<Int2> operator++(const Int2 &val, int);   // Post-increment\r
-       //      friend const Int2 &operator++(const Int2 &val);   // Pre-increment\r
-       //      friend RValue<Int2> operator--(const Int2 &val, int);   // Post-decrement\r
-       //      friend const Int2 &operator--(const Int2 &val);   // Pre-decrement\r
-       //      friend RValue<Bool> operator<(RValue<Int2> lhs, RValue<Int2> rhs);\r
-       //      friend RValue<Bool> operator<=(RValue<Int2> lhs, RValue<Int2> rhs);\r
-       //      friend RValue<Bool> operator>(RValue<Int2> lhs, RValue<Int2> rhs);\r
-       //      friend RValue<Bool> operator>=(RValue<Int2> lhs, RValue<Int2> rhs);\r
-       //      friend RValue<Bool> operator!=(RValue<Int2> lhs, RValue<Int2> rhs);\r
-       //      friend RValue<Bool> operator==(RValue<Int2> lhs, RValue<Int2> rhs);\r
-\r
-       //      friend RValue<Int2> RoundInt(RValue<Float4> cast);\r
-\r
-               friend RValue<Long1> UnpackLow(RValue<Int2> x, RValue<Int2> y);\r
-               friend RValue<Long1> UnpackHigh(RValue<Int2> x, RValue<Int2> y);\r
-               friend RValue<Int> Extract(RValue<Int2> val, int i);\r
-       //      friend RValue<Int2> Insert(RValue<Int2> val, RValue<Int> element, int i);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+\r
+    RValue<Int2> operator+(RValue<Int2> lhs, RValue<Int2> rhs);\r
+    RValue<Int2> operator-(RValue<Int2> lhs, RValue<Int2> rhs);\r
+//     RValue<Int2> operator*(RValue<Int2> lhs, RValue<Int2> rhs);\r
+//     RValue<Int2> operator/(RValue<Int2> lhs, RValue<Int2> rhs);\r
+//     RValue<Int2> operator%(RValue<Int2> lhs, RValue<Int2> rhs);\r
+    RValue<Int2> operator&(RValue<Int2> lhs, RValue<Int2> rhs);\r
+    RValue<Int2> operator|(RValue<Int2> lhs, RValue<Int2> rhs);\r
+    RValue<Int2> operator^(RValue<Int2> lhs, RValue<Int2> rhs);\r
+    RValue<Int2> operator<<(RValue<Int2> lhs, unsigned char rhs);\r
+    RValue<Int2> operator>>(RValue<Int2> lhs, unsigned char rhs);\r
+    RValue<Int2> operator<<(RValue<Int2> lhs, RValue<Long1> rhs);\r
+    RValue<Int2> operator>>(RValue<Int2> lhs, RValue<Long1> rhs);\r
+    RValue<Int2> operator+=(const Int2 &lhs, RValue<Int2> rhs);\r
+    RValue<Int2> operator-=(const Int2 &lhs, RValue<Int2> rhs);\r
+//     RValue<Int2> operator*=(const Int2 &lhs, RValue<Int2> rhs);\r
+//     RValue<Int2> operator/=(const Int2 &lhs, RValue<Int2> rhs);\r
+//     RValue<Int2> operator%=(const Int2 &lhs, RValue<Int2> rhs);\r
+    RValue<Int2> operator&=(const Int2 &lhs, RValue<Int2> rhs);\r
+    RValue<Int2> operator|=(const Int2 &lhs, RValue<Int2> rhs);\r
+    RValue<Int2> operator^=(const Int2 &lhs, RValue<Int2> rhs);\r
+    RValue<Int2> operator<<=(const Int2 &lhs, unsigned char rhs);\r
+    RValue<Int2> operator>>=(const Int2 &lhs, unsigned char rhs);\r
+    RValue<Int2> operator<<=(const Int2 &lhs, RValue<Long1> rhs);\r
+    RValue<Int2> operator>>=(const Int2 &lhs, RValue<Long1> rhs);\r
+//     RValue<Int2> operator+(RValue<Int2> val);\r
+//     RValue<Int2> operator-(RValue<Int2> val);\r
+    RValue<Int2> operator~(RValue<Int2> val);\r
+//     RValue<Int2> operator++(const Int2 &val, int);   // Post-increment\r
+//     const Int2 &operator++(const Int2 &val);   // Pre-increment\r
+//     RValue<Int2> operator--(const Int2 &val, int);   // Post-decrement\r
+//     const Int2 &operator--(const Int2 &val);   // Pre-decrement\r
+//     RValue<Bool> operator<(RValue<Int2> lhs, RValue<Int2> rhs);\r
+//     RValue<Bool> operator<=(RValue<Int2> lhs, RValue<Int2> rhs);\r
+//     RValue<Bool> operator>(RValue<Int2> lhs, RValue<Int2> rhs);\r
+//     RValue<Bool> operator>=(RValue<Int2> lhs, RValue<Int2> rhs);\r
+//     RValue<Bool> operator!=(RValue<Int2> lhs, RValue<Int2> rhs);\r
+//     RValue<Bool> operator==(RValue<Int2> lhs, RValue<Int2> rhs);\r
+\r
+//     RValue<Int2> RoundInt(RValue<Float4> cast);\r
+       RValue<Long1> UnpackLow(RValue<Int2> x, RValue<Int2> y);\r
+       RValue<Long1> UnpackHigh(RValue<Int2> x, RValue<Int2> y);\r
+       RValue<Int> Extract(RValue<Int2> val, int i);\r
+//     RValue<Int2> Insert(RValue<Int2> val, RValue<Int> element, int i);\r
+\r
        class UInt2 : public Variable<UInt2>\r
        {\r
        public:\r
@@ -1584,49 +1570,49 @@ namespace sw
                RValue<UInt2> operator=(const UInt2 &rhs) const;\r
                RValue<UInt2> operator=(const Reference<UInt2> &rhs) const;\r
 \r
-               friend RValue<UInt2> operator+(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
-               friend RValue<UInt2> operator-(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
-       //      friend RValue<UInt2> operator*(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
-       //      friend RValue<UInt2> operator/(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
-       //      friend RValue<UInt2> operator%(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
-               friend RValue<UInt2> operator&(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
-               friend RValue<UInt2> operator|(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
-               friend RValue<UInt2> operator^(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
-               friend RValue<UInt2> operator<<(RValue<UInt2> lhs, unsigned char rhs);\r
-               friend RValue<UInt2> operator>>(RValue<UInt2> lhs, unsigned char rhs);\r
-               friend RValue<UInt2> operator<<(RValue<UInt2> lhs, RValue<Long1> rhs);\r
-               friend RValue<UInt2> operator>>(RValue<UInt2> lhs, RValue<Long1> rhs);\r
-               friend RValue<UInt2> operator+=(const UInt2 &lhs, RValue<UInt2> rhs);\r
-               friend RValue<UInt2> operator-=(const UInt2 &lhs, RValue<UInt2> rhs);\r
-       //      friend RValue<UInt2> operator*=(const UInt2 &lhs, RValue<UInt2> rhs);\r
-       //      friend RValue<UInt2> operator/=(const UInt2 &lhs, RValue<UInt2> rhs);\r
-       //      friend RValue<UInt2> operator%=(const UInt2 &lhs, RValue<UInt2> rhs);\r
-               friend RValue<UInt2> operator&=(const UInt2 &lhs, RValue<UInt2> rhs);\r
-               friend RValue<UInt2> operator|=(const UInt2 &lhs, RValue<UInt2> rhs);\r
-               friend RValue<UInt2> operator^=(const UInt2 &lhs, RValue<UInt2> rhs);\r
-               friend RValue<UInt2> operator<<=(const UInt2 &lhs, unsigned char rhs);\r
-               friend RValue<UInt2> operator>>=(const UInt2 &lhs, unsigned char rhs);\r
-               friend RValue<UInt2> operator<<=(const UInt2 &lhs, RValue<Long1> rhs);\r
-               friend RValue<UInt2> operator>>=(const UInt2 &lhs, RValue<Long1> rhs);\r
-       //      friend RValue<UInt2> operator+(RValue<UInt2> val);\r
-       //      friend RValue<UInt2> operator-(RValue<UInt2> val);\r
-               friend RValue<UInt2> operator~(RValue<UInt2> val);\r
-       //      friend RValue<UInt2> operator++(const UInt2 &val, int);   // Post-increment\r
-       //      friend const UInt2 &operator++(const UInt2 &val);   // Pre-increment\r
-       //      friend RValue<UInt2> operator--(const UInt2 &val, int);   // Post-decrement\r
-       //      friend const UInt2 &operator--(const UInt2 &val);   // Pre-decrement\r
-       //      friend RValue<Bool> operator<(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
-       //      friend RValue<Bool> operator<=(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
-       //      friend RValue<Bool> operator>(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
-       //      friend RValue<Bool> operator>=(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
-       //      friend RValue<Bool> operator!=(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
-       //      friend RValue<Bool> operator==(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
-\r
-       //      friend RValue<UInt2> RoundInt(RValue<Float4> cast);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+    RValue<UInt2> operator+(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
+    RValue<UInt2> operator-(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
+//     RValue<UInt2> operator*(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
+//     RValue<UInt2> operator/(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
+//     RValue<UInt2> operator%(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
+    RValue<UInt2> operator&(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
+    RValue<UInt2> operator|(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
+    RValue<UInt2> operator^(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
+    RValue<UInt2> operator<<(RValue<UInt2> lhs, unsigned char rhs);\r
+    RValue<UInt2> operator>>(RValue<UInt2> lhs, unsigned char rhs);\r
+    RValue<UInt2> operator<<(RValue<UInt2> lhs, RValue<Long1> rhs);\r
+    RValue<UInt2> operator>>(RValue<UInt2> lhs, RValue<Long1> rhs);\r
+    RValue<UInt2> operator+=(const UInt2 &lhs, RValue<UInt2> rhs);\r
+    RValue<UInt2> operator-=(const UInt2 &lhs, RValue<UInt2> rhs);\r
+//     RValue<UInt2> operator*=(const UInt2 &lhs, RValue<UInt2> rhs);\r
+//     RValue<UInt2> operator/=(const UInt2 &lhs, RValue<UInt2> rhs);\r
+//     RValue<UInt2> operator%=(const UInt2 &lhs, RValue<UInt2> rhs);\r
+    RValue<UInt2> operator&=(const UInt2 &lhs, RValue<UInt2> rhs);\r
+    RValue<UInt2> operator|=(const UInt2 &lhs, RValue<UInt2> rhs);\r
+    RValue<UInt2> operator^=(const UInt2 &lhs, RValue<UInt2> rhs);\r
+    RValue<UInt2> operator<<=(const UInt2 &lhs, unsigned char rhs);\r
+    RValue<UInt2> operator>>=(const UInt2 &lhs, unsigned char rhs);\r
+    RValue<UInt2> operator<<=(const UInt2 &lhs, RValue<Long1> rhs);\r
+    RValue<UInt2> operator>>=(const UInt2 &lhs, RValue<Long1> rhs);\r
+//     RValue<UInt2> operator+(RValue<UInt2> val);\r
+//     RValue<UInt2> operator-(RValue<UInt2> val);\r
+    RValue<UInt2> operator~(RValue<UInt2> val);\r
+//     RValue<UInt2> operator++(const UInt2 &val, int);   // Post-increment\r
+//     const UInt2 &operator++(const UInt2 &val);   // Pre-increment\r
+//     RValue<UInt2> operator--(const UInt2 &val, int);   // Post-decrement\r
+//     const UInt2 &operator--(const UInt2 &val);   // Pre-decrement\r
+//     RValue<Bool> operator<(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
+//     RValue<Bool> operator<=(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
+//     RValue<Bool> operator>(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
+//     RValue<Bool> operator>=(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
+//     RValue<Bool> operator!=(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
+//     RValue<Bool> operator==(RValue<UInt2> lhs, RValue<UInt2> rhs);\r
+\r
+//     RValue<UInt2> RoundInt(RValue<Float4> cast);\r
+\r
        class Int4 : public Variable<Int4>\r
        {\r
        public:\r
@@ -1648,64 +1634,62 @@ namespace sw
                RValue<Int4> operator=(const Int4 &rhs) const;\r
                RValue<Int4> operator=(const Reference<Int4> &rhs) const;\r
 \r
-               friend RValue<Int4> operator+(RValue<Int4> lhs, RValue<Int4> rhs);\r
-               friend RValue<Int4> operator-(RValue<Int4> lhs, RValue<Int4> rhs);\r
-               friend RValue<Int4> operator*(RValue<Int4> lhs, RValue<Int4> rhs);\r
-       //      friend RValue<Int4> operator/(RValue<Int4> lhs, RValue<Int4> rhs);\r
-       //      friend RValue<Int4> operator%(RValue<Int4> lhs, RValue<Int4> rhs);\r
-               friend RValue<Int4> operator&(RValue<Int4> lhs, RValue<Int4> rhs);\r
-               friend RValue<Int4> operator|(RValue<Int4> lhs, RValue<Int4> rhs);\r
-               friend RValue<Int4> operator^(RValue<Int4> lhs, RValue<Int4> rhs);\r
-               friend RValue<Int4> operator<<(RValue<Int4> lhs, unsigned char rhs);\r
-               friend RValue<Int4> operator>>(RValue<Int4> lhs, unsigned char rhs);\r
-               friend RValue<Int4> operator+=(const Int4 &lhs, RValue<Int4> rhs);\r
-               friend RValue<Int4> operator-=(const Int4 &lhs, RValue<Int4> rhs);\r
-               friend RValue<Int4> operator*=(const Int4 &lhs, RValue<Int4> rhs);\r
-       //      friend RValue<Int4> operator/=(const Int4 &lhs, RValue<Int4> rhs);\r
-       //      friend RValue<Int4> operator%=(const Int4 &lhs, RValue<Int4> rhs);\r
-               friend RValue<Int4> operator&=(const Int4 &lhs, RValue<Int4> rhs);\r
-               friend RValue<Int4> operator|=(const Int4 &lhs, RValue<Int4> rhs);\r
-               friend RValue<Int4> operator^=(const Int4 &lhs, RValue<Int4> rhs);\r
-               friend RValue<Int4> operator<<=(const Int4 &lhs, unsigned char rhs);\r
-               friend RValue<Int4> operator>>=(const Int4 &lhs, unsigned char rhs);\r
-               friend RValue<Int4> operator+(RValue<Int4> val);\r
-               friend RValue<Int4> operator-(RValue<Int4> val);\r
-               friend RValue<Int4> operator~(RValue<Int4> val);\r
-       //      friend RValue<Int4> operator++(const Int4 &val, int);   // Post-increment\r
-       //      friend const Int4 &operator++(const Int4 &val);   // Pre-increment\r
-       //      friend RValue<Int4> operator--(const Int4 &val, int);   // Post-decrement\r
-       //      friend const Int4 &operator--(const Int4 &val);   // Pre-decrement\r
-       //      friend RValue<Bool> operator<(RValue<Int4> lhs, RValue<Int4> rhs);\r
-       //      friend RValue<Bool> operator<=(RValue<Int4> lhs, RValue<Int4> rhs);\r
-       //      friend RValue<Bool> operator>(RValue<Int4> lhs, RValue<Int4> rhs);\r
-       //      friend RValue<Bool> operator>=(RValue<Int4> lhs, RValue<Int4> rhs);\r
-       //      friend RValue<Bool> operator!=(RValue<Int4> lhs, RValue<Int4> rhs);\r
-       //      friend RValue<Bool> operator==(RValue<Int4> lhs, RValue<Int4> rhs);\r
-\r
-               friend RValue<Int4> CmpEQ(RValue<Int4> x, RValue<Int4> y);\r
-               friend RValue<Int4> CmpLT(RValue<Int4> x, RValue<Int4> y);\r
-               friend RValue<Int4> CmpLE(RValue<Int4> x, RValue<Int4> y);\r
-               friend RValue<Int4> CmpNEQ(RValue<Int4> x, RValue<Int4> y);\r
-               friend RValue<Int4> CmpNLT(RValue<Int4> x, RValue<Int4> y);\r
-               friend RValue<Int4> CmpNLE(RValue<Int4> x, RValue<Int4> y);\r
-\r
-               friend RValue<Int4> Max(RValue<Int4> x, RValue<Int4> y);\r
-               friend RValue<Int4> Min(RValue<Int4> x, RValue<Int4> y);\r
-\r
-               friend RValue<Int4> RoundInt(RValue<Float4> cast);\r
-               friend RValue<Short8> Pack(RValue<Int4> x, RValue<Int4> y);\r
-               friend RValue<Int4> Concatenate(RValue<Int2> lo, RValue<Int2> hi);\r
-               friend RValue<Int> Extract(RValue<Int4> x, int i);\r
-               friend RValue<Int4> Insert(RValue<Int4> val, RValue<Int> element, int i);\r
-               friend RValue<Int> SignMask(RValue<Int4> x);\r
-               friend RValue<Int4> Swizzle(RValue<Int4> x, unsigned char select);\r
-\r
                static llvm::Type *getType();\r
 \r
        private:\r
                void constant(int x, int y, int z, int w);\r
        };\r
 \r
+    RValue<Int4> operator+(RValue<Int4> lhs, RValue<Int4> rhs);\r
+    RValue<Int4> operator-(RValue<Int4> lhs, RValue<Int4> rhs);\r
+    RValue<Int4> operator*(RValue<Int4> lhs, RValue<Int4> rhs);\r
+//     RValue<Int4> operator/(RValue<Int4> lhs, RValue<Int4> rhs);\r
+//     RValue<Int4> operator%(RValue<Int4> lhs, RValue<Int4> rhs);\r
+    RValue<Int4> operator&(RValue<Int4> lhs, RValue<Int4> rhs);\r
+    RValue<Int4> operator|(RValue<Int4> lhs, RValue<Int4> rhs);\r
+    RValue<Int4> operator^(RValue<Int4> lhs, RValue<Int4> rhs);\r
+    RValue<Int4> operator<<(RValue<Int4> lhs, unsigned char rhs);\r
+    RValue<Int4> operator>>(RValue<Int4> lhs, unsigned char rhs);\r
+    RValue<Int4> operator+=(const Int4 &lhs, RValue<Int4> rhs);\r
+    RValue<Int4> operator-=(const Int4 &lhs, RValue<Int4> rhs);\r
+    RValue<Int4> operator*=(const Int4 &lhs, RValue<Int4> rhs);\r
+//     RValue<Int4> operator/=(const Int4 &lhs, RValue<Int4> rhs);\r
+//     RValue<Int4> operator%=(const Int4 &lhs, RValue<Int4> rhs);\r
+    RValue<Int4> operator&=(const Int4 &lhs, RValue<Int4> rhs);\r
+    RValue<Int4> operator|=(const Int4 &lhs, RValue<Int4> rhs);\r
+    RValue<Int4> operator^=(const Int4 &lhs, RValue<Int4> rhs);\r
+    RValue<Int4> operator<<=(const Int4 &lhs, unsigned char rhs);\r
+    RValue<Int4> operator>>=(const Int4 &lhs, unsigned char rhs);\r
+    RValue<Int4> operator+(RValue<Int4> val);\r
+    RValue<Int4> operator-(RValue<Int4> val);\r
+    RValue<Int4> operator~(RValue<Int4> val);\r
+//     RValue<Int4> operator++(const Int4 &val, int);   // Post-increment\r
+//     const Int4 &operator++(const Int4 &val);   // Pre-increment\r
+//     RValue<Int4> operator--(const Int4 &val, int);   // Post-decrement\r
+//     const Int4 &operator--(const Int4 &val);   // Pre-decrement\r
+//     RValue<Bool> operator<(RValue<Int4> lhs, RValue<Int4> rhs);\r
+//     RValue<Bool> operator<=(RValue<Int4> lhs, RValue<Int4> rhs);\r
+//     RValue<Bool> operator>(RValue<Int4> lhs, RValue<Int4> rhs);\r
+//     RValue<Bool> operator>=(RValue<Int4> lhs, RValue<Int4> rhs);\r
+//     RValue<Bool> operator!=(RValue<Int4> lhs, RValue<Int4> rhs);\r
+//     RValue<Bool> operator==(RValue<Int4> lhs, RValue<Int4> rhs);\r
+\r
+       RValue<Int4> CmpEQ(RValue<Int4> x, RValue<Int4> y);\r
+       RValue<Int4> CmpLT(RValue<Int4> x, RValue<Int4> y);\r
+       RValue<Int4> CmpLE(RValue<Int4> x, RValue<Int4> y);\r
+       RValue<Int4> CmpNEQ(RValue<Int4> x, RValue<Int4> y);\r
+       RValue<Int4> CmpNLT(RValue<Int4> x, RValue<Int4> y);\r
+       RValue<Int4> CmpNLE(RValue<Int4> x, RValue<Int4> y);\r
+       RValue<Int4> Max(RValue<Int4> x, RValue<Int4> y);\r
+       RValue<Int4> Min(RValue<Int4> x, RValue<Int4> y);\r
+       RValue<Int4> RoundInt(RValue<Float4> cast);\r
+       RValue<Short8> Pack(RValue<Int4> x, RValue<Int4> y);\r
+       RValue<Int4> Concatenate(RValue<Int2> lo, RValue<Int2> hi);\r
+       RValue<Int> Extract(RValue<Int4> x, int i);\r
+       RValue<Int4> Insert(RValue<Int4> val, RValue<Int> element, int i);\r
+       RValue<Int> SignMask(RValue<Int4> x);\r
+       RValue<Int4> Swizzle(RValue<Int4> x, unsigned char select);\r
+\r
        class UInt4 : public Variable<UInt4>\r
        {\r
        public:\r
@@ -1728,60 +1712,58 @@ namespace sw
                RValue<UInt4> operator=(const UInt4 &rhs) const;\r
                RValue<UInt4> operator=(const Reference<UInt4> &rhs) const;\r
 \r
-               friend RValue<UInt4> operator+(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
-               friend RValue<UInt4> operator-(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
-               friend RValue<UInt4> operator*(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
-       //      friend RValue<UInt4> operator/(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
-       //      friend RValue<UInt4> operator%(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
-               friend RValue<UInt4> operator&(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
-               friend RValue<UInt4> operator|(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
-               friend RValue<UInt4> operator^(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
-               friend RValue<UInt4> operator<<(RValue<UInt4> lhs, unsigned char rhs);\r
-               friend RValue<UInt4> operator>>(RValue<UInt4> lhs, unsigned char rhs);\r
-               friend RValue<UInt4> operator+=(const UInt4 &lhs, RValue<UInt4> rhs);\r
-               friend RValue<UInt4> operator-=(const UInt4 &lhs, RValue<UInt4> rhs);\r
-               friend RValue<UInt4> operator*=(const UInt4 &lhs, RValue<UInt4> rhs);\r
-       //      friend RValue<UInt4> operator/=(const UInt4 &lhs, RValue<UInt4> rhs);\r
-       //      friend RValue<UInt4> operator%=(const UInt4 &lhs, RValue<UInt4> rhs);\r
-               friend RValue<UInt4> operator&=(const UInt4 &lhs, RValue<UInt4> rhs);\r
-               friend RValue<UInt4> operator|=(const UInt4 &lhs, RValue<UInt4> rhs);\r
-               friend RValue<UInt4> operator^=(const UInt4 &lhs, RValue<UInt4> rhs);\r
-               friend RValue<UInt4> operator<<=(const UInt4 &lhs, unsigned char rhs);\r
-               friend RValue<UInt4> operator>>=(const UInt4 &lhs, unsigned char rhs);\r
-               friend RValue<UInt4> operator+(RValue<UInt4> val);\r
-               friend RValue<UInt4> operator-(RValue<UInt4> val);\r
-               friend RValue<UInt4> operator~(RValue<UInt4> val);\r
-       //      friend RValue<UInt4> operator++(const UInt4 &val, int);   // Post-increment\r
-       //      friend const UInt4 &operator++(const UInt4 &val);   // Pre-increment\r
-       //      friend RValue<UInt4> operator--(const UInt4 &val, int);   // Post-decrement\r
-       //      friend const UInt4 &operator--(const UInt4 &val);   // Pre-decrement\r
-       //      friend RValue<Bool> operator<(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
-       //      friend RValue<Bool> operator<=(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
-       //      friend RValue<Bool> operator>(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
-       //      friend RValue<Bool> operator>=(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
-       //      friend RValue<Bool> operator!=(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
-       //      friend RValue<Bool> operator==(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
-\r
-               friend RValue<UInt4> CmpEQ(RValue<UInt4> x, RValue<UInt4> y);\r
-               friend RValue<UInt4> CmpLT(RValue<UInt4> x, RValue<UInt4> y);\r
-               friend RValue<UInt4> CmpLE(RValue<UInt4> x, RValue<UInt4> y);\r
-               friend RValue<UInt4> CmpNEQ(RValue<UInt4> x, RValue<UInt4> y);\r
-               friend RValue<UInt4> CmpNLT(RValue<UInt4> x, RValue<UInt4> y);\r
-               friend RValue<UInt4> CmpNLE(RValue<UInt4> x, RValue<UInt4> y);\r
-\r
-               friend RValue<UInt4> Max(RValue<UInt4> x, RValue<UInt4> y);\r
-               friend RValue<UInt4> Min(RValue<UInt4> x, RValue<UInt4> y);\r
-\r
-       //      friend RValue<UInt4> RoundInt(RValue<Float4> cast);\r
-               friend RValue<UShort8> Pack(RValue<UInt4> x, RValue<UInt4> y);\r
-               friend RValue<UInt4> Concatenate(RValue<UInt2> lo, RValue<UInt2> hi);\r
-\r
                static llvm::Type *getType();\r
 \r
        private:\r
                void constant(int x, int y, int z, int w);\r
        };\r
 \r
+    RValue<UInt4> operator+(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
+    RValue<UInt4> operator-(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
+    RValue<UInt4> operator*(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
+//     RValue<UInt4> operator/(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
+//     RValue<UInt4> operator%(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
+    RValue<UInt4> operator&(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
+    RValue<UInt4> operator|(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
+    RValue<UInt4> operator^(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
+    RValue<UInt4> operator<<(RValue<UInt4> lhs, unsigned char rhs);\r
+    RValue<UInt4> operator>>(RValue<UInt4> lhs, unsigned char rhs);\r
+    RValue<UInt4> operator+=(const UInt4 &lhs, RValue<UInt4> rhs);\r
+    RValue<UInt4> operator-=(const UInt4 &lhs, RValue<UInt4> rhs);\r
+    RValue<UInt4> operator*=(const UInt4 &lhs, RValue<UInt4> rhs);\r
+//     RValue<UInt4> operator/=(const UInt4 &lhs, RValue<UInt4> rhs);\r
+//     RValue<UInt4> operator%=(const UInt4 &lhs, RValue<UInt4> rhs);\r
+    RValue<UInt4> operator&=(const UInt4 &lhs, RValue<UInt4> rhs);\r
+    RValue<UInt4> operator|=(const UInt4 &lhs, RValue<UInt4> rhs);\r
+    RValue<UInt4> operator^=(const UInt4 &lhs, RValue<UInt4> rhs);\r
+    RValue<UInt4> operator<<=(const UInt4 &lhs, unsigned char rhs);\r
+    RValue<UInt4> operator>>=(const UInt4 &lhs, unsigned char rhs);\r
+    RValue<UInt4> operator+(RValue<UInt4> val);\r
+    RValue<UInt4> operator-(RValue<UInt4> val);\r
+    RValue<UInt4> operator~(RValue<UInt4> val);\r
+//     RValue<UInt4> operator++(const UInt4 &val, int);   // Post-increment\r
+//     const UInt4 &operator++(const UInt4 &val);   // Pre-increment\r
+//     RValue<UInt4> operator--(const UInt4 &val, int);   // Post-decrement\r
+//     const UInt4 &operator--(const UInt4 &val);   // Pre-decrement\r
+//     RValue<Bool> operator<(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
+//     RValue<Bool> operator<=(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
+//     RValue<Bool> operator>(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
+//     RValue<Bool> operator>=(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
+//     RValue<Bool> operator!=(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
+//     RValue<Bool> operator==(RValue<UInt4> lhs, RValue<UInt4> rhs);\r
+\r
+       RValue<UInt4> CmpEQ(RValue<UInt4> x, RValue<UInt4> y);\r
+       RValue<UInt4> CmpLT(RValue<UInt4> x, RValue<UInt4> y);\r
+       RValue<UInt4> CmpLE(RValue<UInt4> x, RValue<UInt4> y);\r
+       RValue<UInt4> CmpNEQ(RValue<UInt4> x, RValue<UInt4> y);\r
+       RValue<UInt4> CmpNLT(RValue<UInt4> x, RValue<UInt4> y);\r
+       RValue<UInt4> CmpNLE(RValue<UInt4> x, RValue<UInt4> y);\r
+       RValue<UInt4> Max(RValue<UInt4> x, RValue<UInt4> y);\r
+       RValue<UInt4> Min(RValue<UInt4> x, RValue<UInt4> y);\r
+//     RValue<UInt4> RoundInt(RValue<Float4> cast);\r
+       RValue<UShort8> Pack(RValue<UInt4> x, RValue<UInt4> y);\r
+       RValue<UInt4> Concatenate(RValue<UInt2> lo, RValue<UInt2> hi);\r
+\r
        template<int T>\r
        class Swizzle2Float4\r
        {\r
@@ -1870,40 +1852,38 @@ namespace sw
                template<int T>\r
                RValue<Float> operator=(const SwizzleMask1Float4<T> &rhs) const;\r
 \r
-               friend RValue<Float> operator+(RValue<Float> lhs, RValue<Float> rhs);\r
-               friend RValue<Float> operator-(RValue<Float> lhs, RValue<Float> rhs);\r
-               friend RValue<Float> operator*(RValue<Float> lhs, RValue<Float> rhs);\r
-               friend RValue<Float> operator/(RValue<Float> lhs, RValue<Float> rhs);\r
-               friend RValue<Float> operator+=(const Float &lhs, RValue<Float> rhs);\r
-               friend RValue<Float> operator-=(const Float &lhs, RValue<Float> rhs);\r
-               friend RValue<Float> operator*=(const Float &lhs, RValue<Float> rhs);\r
-               friend RValue<Float> operator/=(const Float &lhs, RValue<Float> rhs);\r
-               friend RValue<Float> operator+(RValue<Float> val);\r
-               friend RValue<Float> operator-(RValue<Float> val);\r
-               friend RValue<Bool> operator<(RValue<Float> lhs, RValue<Float> rhs);\r
-               friend RValue<Bool> operator<=(RValue<Float> lhs, RValue<Float> rhs);\r
-               friend RValue<Bool> operator>(RValue<Float> lhs, RValue<Float> rhs);\r
-               friend RValue<Bool> operator>=(RValue<Float> lhs, RValue<Float> rhs);\r
-               friend RValue<Bool> operator!=(RValue<Float> lhs, RValue<Float> rhs);\r
-               friend RValue<Bool> operator==(RValue<Float> lhs, RValue<Float> rhs);\r
-\r
-               friend RValue<Float> Abs(RValue<Float> x);\r
-               friend RValue<Float> Max(RValue<Float> x, RValue<Float> y);\r
-               friend RValue<Float> Min(RValue<Float> x, RValue<Float> y);\r
-\r
-               friend RValue<Float> Rcp_pp(RValue<Float> val);\r
-               friend RValue<Float> RcpSqrt_pp(RValue<Float> val);\r
-               friend RValue<Float> Sqrt(RValue<Float> x);\r
-\r
-               friend RValue<Float> Round(RValue<Float> val);\r
-               friend RValue<Float> Trunc(RValue<Float> val);\r
-               friend RValue<Float> Frac(RValue<Float> val);\r
-               friend RValue<Float> Floor(RValue<Float> val);\r
-               friend RValue<Float> Ceil(RValue<Float> val);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+    RValue<Float> operator+(RValue<Float> lhs, RValue<Float> rhs);\r
+    RValue<Float> operator-(RValue<Float> lhs, RValue<Float> rhs);\r
+    RValue<Float> operator*(RValue<Float> lhs, RValue<Float> rhs);\r
+    RValue<Float> operator/(RValue<Float> lhs, RValue<Float> rhs);\r
+    RValue<Float> operator+=(const Float &lhs, RValue<Float> rhs);\r
+    RValue<Float> operator-=(const Float &lhs, RValue<Float> rhs);\r
+    RValue<Float> operator*=(const Float &lhs, RValue<Float> rhs);\r
+    RValue<Float> operator/=(const Float &lhs, RValue<Float> rhs);\r
+    RValue<Float> operator+(RValue<Float> val);\r
+    RValue<Float> operator-(RValue<Float> val);\r
+    RValue<Bool> operator<(RValue<Float> lhs, RValue<Float> rhs);\r
+    RValue<Bool> operator<=(RValue<Float> lhs, RValue<Float> rhs);\r
+    RValue<Bool> operator>(RValue<Float> lhs, RValue<Float> rhs);\r
+    RValue<Bool> operator>=(RValue<Float> lhs, RValue<Float> rhs);\r
+    RValue<Bool> operator!=(RValue<Float> lhs, RValue<Float> rhs);\r
+    RValue<Bool> operator==(RValue<Float> lhs, RValue<Float> rhs);\r
+\r
+       RValue<Float> Abs(RValue<Float> x);\r
+       RValue<Float> Max(RValue<Float> x, RValue<Float> y);\r
+       RValue<Float> Min(RValue<Float> x, RValue<Float> y);\r
+       RValue<Float> Rcp_pp(RValue<Float> val);\r
+       RValue<Float> RcpSqrt_pp(RValue<Float> val);\r
+       RValue<Float> Sqrt(RValue<Float> x);\r
+       RValue<Float> Round(RValue<Float> val);\r
+       RValue<Float> Trunc(RValue<Float> val);\r
+       RValue<Float> Frac(RValue<Float> val);\r
+       RValue<Float> Floor(RValue<Float> val);\r
+       RValue<Float> Ceil(RValue<Float> val);\r
+\r
        class Float2 : public Variable<Float2>\r
        {\r
        public:\r
@@ -1937,29 +1917,28 @@ namespace sw
        //      template<int T>\r
        //      RValue<Float2> operator=(const SwizzleMask1Float4<T> &rhs);\r
 \r
-       //      friend RValue<Float2> operator+(RValue<Float2> lhs, RValue<Float2> rhs);\r
-       //      friend RValue<Float2> operator-(RValue<Float2> lhs, RValue<Float2> rhs);\r
-       //      friend RValue<Float2> operator*(RValue<Float2> lhs, RValue<Float2> rhs);\r
-       //      friend RValue<Float2> operator/(RValue<Float2> lhs, RValue<Float2> rhs);\r
-       //      friend RValue<Float2> operator%(RValue<Float2> lhs, RValue<Float2> rhs);\r
-       //      friend RValue<Float2> operator+=(const Float2 &lhs, RValue<Float2> rhs);\r
-       //      friend RValue<Float2> operator-=(const Float2 &lhs, RValue<Float2> rhs);\r
-       //      friend RValue<Float2> operator*=(const Float2 &lhs, RValue<Float2> rhs);\r
-       //      friend RValue<Float2> operator/=(const Float2 &lhs, RValue<Float2> rhs);\r
-       //      friend RValue<Float2> operator%=(const Float2 &lhs, RValue<Float2> rhs);\r
-       //      friend RValue<Float2> operator+(RValue<Float2> val);\r
-       //      friend RValue<Float2> operator-(RValue<Float2> val);\r
-\r
-       //      friend RValue<Float2> Abs(RValue<Float2> x);\r
-       //      friend RValue<Float2> Max(RValue<Float2> x, RValue<Float2> y);\r
-       //      friend RValue<Float2> Min(RValue<Float2> x, RValue<Float2> y);\r
-\r
-       //      friend RValue<Float2> Swizzle(RValue<Float2> x, unsigned char select);\r
-       //      friend RValue<Float2> Mask(Float2 &lhs, RValue<Float2> rhs, unsigned char select);\r
-\r
                static llvm::Type *getType();\r
        };\r
 \r
+//     RValue<Float2> operator+(RValue<Float2> lhs, RValue<Float2> rhs);\r
+//     RValue<Float2> operator-(RValue<Float2> lhs, RValue<Float2> rhs);\r
+//     RValue<Float2> operator*(RValue<Float2> lhs, RValue<Float2> rhs);\r
+//     RValue<Float2> operator/(RValue<Float2> lhs, RValue<Float2> rhs);\r
+//     RValue<Float2> operator%(RValue<Float2> lhs, RValue<Float2> rhs);\r
+//     RValue<Float2> operator+=(const Float2 &lhs, RValue<Float2> rhs);\r
+//     RValue<Float2> operator-=(const Float2 &lhs, RValue<Float2> rhs);\r
+//     RValue<Float2> operator*=(const Float2 &lhs, RValue<Float2> rhs);\r
+//     RValue<Float2> operator/=(const Float2 &lhs, RValue<Float2> rhs);\r
+//     RValue<Float2> operator%=(const Float2 &lhs, RValue<Float2> rhs);\r
+//     RValue<Float2> operator+(RValue<Float2> val);\r
+//     RValue<Float2> operator-(RValue<Float2> val);\r
+\r
+//     RValue<Float2> Abs(RValue<Float2> x);\r
+//     RValue<Float2> Max(RValue<Float2> x, RValue<Float2> y);\r
+//     RValue<Float2> Min(RValue<Float2> x, RValue<Float2> y);\r
+//     RValue<Float2> Swizzle(RValue<Float2> x, unsigned char select);\r
+//     RValue<Float2> Mask(Float2 &lhs, RValue<Float2> rhs, unsigned char select);\r
+\r
        class Float4 : public Variable<Float4>\r
        {\r
        public:\r
@@ -2008,49 +1987,6 @@ namespace sw
                template<int T>\r
                RValue<Float4> operator=(const SwizzleFloat4<T> &rhs);\r
 \r
-               friend RValue<Float4> operator+(RValue<Float4> lhs, RValue<Float4> rhs);\r
-               friend RValue<Float4> operator-(RValue<Float4> lhs, RValue<Float4> rhs);\r
-               friend RValue<Float4> operator*(RValue<Float4> lhs, RValue<Float4> rhs);\r
-               friend RValue<Float4> operator/(RValue<Float4> lhs, RValue<Float4> rhs);\r
-               friend RValue<Float4> operator%(RValue<Float4> lhs, RValue<Float4> rhs);\r
-               friend RValue<Float4> operator+=(const Float4 &lhs, RValue<Float4> rhs);\r
-               friend RValue<Float4> operator-=(const Float4 &lhs, RValue<Float4> rhs);\r
-               friend RValue<Float4> operator*=(const Float4 &lhs, RValue<Float4> rhs);\r
-               friend RValue<Float4> operator/=(const Float4 &lhs, RValue<Float4> rhs);\r
-               friend RValue<Float4> operator%=(const Float4 &lhs, RValue<Float4> rhs);\r
-               friend RValue<Float4> operator+(RValue<Float4> val);\r
-               friend RValue<Float4> operator-(RValue<Float4> val);\r
-\r
-               friend RValue<Float4> Abs(RValue<Float4> x);\r
-               friend RValue<Float4> Max(RValue<Float4> x, RValue<Float4> y);\r
-               friend RValue<Float4> Min(RValue<Float4> x, RValue<Float4> y);\r
-\r
-               friend RValue<Float4> Rcp_pp(RValue<Float4> val);\r
-               friend RValue<Float4> RcpSqrt_pp(RValue<Float4> val);\r
-               friend RValue<Float4> Sqrt(RValue<Float4> x);\r
-\r
-               friend RValue<Float4> Insert(const Float4 &val, RValue<Float> element, int i);\r
-               friend RValue<Float> Extract(RValue<Float4> x, int i);\r
-               friend RValue<Float4> Swizzle(RValue<Float4> x, unsigned char select);\r
-               friend RValue<Float4> ShuffleLowHigh(RValue<Float4> x, RValue<Float4> y, unsigned char imm);\r
-               friend RValue<Float4> UnpackLow(RValue<Float4> x, RValue<Float4> y);\r
-               friend RValue<Float4> UnpackHigh(RValue<Float4> x, RValue<Float4> y);\r
-               friend RValue<Float4> Mask(Float4 &lhs, RValue<Float4> rhs, unsigned char select);\r
-               friend RValue<Int> SignMask(RValue<Float4> x);\r
-\r
-               friend RValue<Int4> CmpEQ(RValue<Float4> x, RValue<Float4> y);\r
-               friend RValue<Int4> CmpLT(RValue<Float4> x, RValue<Float4> y);\r
-               friend RValue<Int4> CmpLE(RValue<Float4> x, RValue<Float4> y);\r
-               friend RValue<Int4> CmpNEQ(RValue<Float4> x, RValue<Float4> y);\r
-               friend RValue<Int4> CmpNLT(RValue<Float4> x, RValue<Float4> y);\r
-               friend RValue<Int4> CmpNLE(RValue<Float4> x, RValue<Float4> y);\r
-\r
-               friend RValue<Float4> Round(RValue<Float4> x);\r
-               friend RValue<Float4> Trunc(RValue<Float4> x);\r
-               friend RValue<Float4> Frac(RValue<Float4> x);\r
-               friend RValue<Float4> Floor(RValue<Float4> x);\r
-               friend RValue<Float4> Ceil(RValue<Float4> x);\r
-\r
                static llvm::Type *getType();\r
 \r
                union\r
@@ -2401,6 +2337,45 @@ namespace sw
                void constant(float x, float y, float z, float w);\r
        };\r
 \r
+       RValue<Float4> operator+(RValue<Float4> lhs, RValue<Float4> rhs);\r
+       RValue<Float4> operator-(RValue<Float4> lhs, RValue<Float4> rhs);\r
+       RValue<Float4> operator*(RValue<Float4> lhs, RValue<Float4> rhs);\r
+       RValue<Float4> operator/(RValue<Float4> lhs, RValue<Float4> rhs);\r
+       RValue<Float4> operator%(RValue<Float4> lhs, RValue<Float4> rhs);\r
+       RValue<Float4> operator+=(const Float4 &lhs, RValue<Float4> rhs);\r
+       RValue<Float4> operator-=(const Float4 &lhs, RValue<Float4> rhs);\r
+       RValue<Float4> operator*=(const Float4 &lhs, RValue<Float4> rhs);\r
+       RValue<Float4> operator/=(const Float4 &lhs, RValue<Float4> rhs);\r
+       RValue<Float4> operator%=(const Float4 &lhs, RValue<Float4> rhs);\r
+       RValue<Float4> operator+(RValue<Float4> val);\r
+       RValue<Float4> operator-(RValue<Float4> val);\r
+\r
+       RValue<Float4> Abs(RValue<Float4> x);\r
+       RValue<Float4> Max(RValue<Float4> x, RValue<Float4> y);\r
+       RValue<Float4> Min(RValue<Float4> x, RValue<Float4> y);\r
+       RValue<Float4> Rcp_pp(RValue<Float4> val);\r
+       RValue<Float4> RcpSqrt_pp(RValue<Float4> val);\r
+       RValue<Float4> Sqrt(RValue<Float4> x);\r
+       RValue<Float4> Insert(const Float4 &val, RValue<Float> element, int i);\r
+       RValue<Float> Extract(RValue<Float4> x, int i);\r
+       RValue<Float4> Swizzle(RValue<Float4> x, unsigned char select);\r
+       RValue<Float4> ShuffleLowHigh(RValue<Float4> x, RValue<Float4> y, unsigned char imm);\r
+       RValue<Float4> UnpackLow(RValue<Float4> x, RValue<Float4> y);\r
+       RValue<Float4> UnpackHigh(RValue<Float4> x, RValue<Float4> y);\r
+       RValue<Float4> Mask(Float4 &lhs, RValue<Float4> rhs, unsigned char select);\r
+       RValue<Int> SignMask(RValue<Float4> x);\r
+       RValue<Int4> CmpEQ(RValue<Float4> x, RValue<Float4> y);\r
+       RValue<Int4> CmpLT(RValue<Float4> x, RValue<Float4> y);\r
+       RValue<Int4> CmpLE(RValue<Float4> x, RValue<Float4> y);\r
+       RValue<Int4> CmpNEQ(RValue<Float4> x, RValue<Float4> y);\r
+       RValue<Int4> CmpNLT(RValue<Float4> x, RValue<Float4> y);\r
+       RValue<Int4> CmpNLE(RValue<Float4> x, RValue<Float4> y);\r
+       RValue<Float4> Round(RValue<Float4> x);\r
+       RValue<Float4> Trunc(RValue<Float4> x);\r
+       RValue<Float4> Frac(RValue<Float4> x);\r
+       RValue<Float4> Floor(RValue<Float4> x);\r
+       RValue<Float4> Ceil(RValue<Float4> x);\r
+\r
        template<class T>\r
        class Pointer : public Variable<Pointer<T> >\r
        {\r
@@ -2434,26 +2409,26 @@ namespace sw
 \r
                Reference<T> operator*();\r
 \r
-               friend RValue<Pointer<Byte> > operator+(RValue<Pointer<Byte> > lhs, int offset);\r
-               friend RValue<Pointer<Byte> > operator+(RValue<Pointer<Byte> > lhs, RValue<Int> offset);\r
-               friend RValue<Pointer<Byte> > operator+(RValue<Pointer<Byte> > lhs, RValue<UInt> offset);\r
-               friend RValue<Pointer<Byte> > operator+=(const Pointer<Byte> &lhs, int offset);\r
-               friend RValue<Pointer<Byte> > operator+=(const Pointer<Byte> &lhs, RValue<Int> offset);\r
-               friend RValue<Pointer<Byte> > operator+=(const Pointer<Byte> &lhs, RValue<UInt> offset);\r
-\r
-               friend RValue<Pointer<Byte> > operator-(RValue<Pointer<Byte> > lhs, int offset);\r
-               friend RValue<Pointer<Byte> > operator-(RValue<Pointer<Byte> > lhs, RValue<Int> offset);\r
-               friend RValue<Pointer<Byte> > operator-(RValue<Pointer<Byte> > lhs, RValue<UInt> offset);\r
-               friend RValue<Pointer<Byte> > operator-=(const Pointer<Byte> &lhs, int offset);\r
-               friend RValue<Pointer<Byte> > operator-=(const Pointer<Byte> &lhs, RValue<Int> offset);\r
-               friend RValue<Pointer<Byte> > operator-=(const Pointer<Byte> &lhs, RValue<UInt> offset);\r
-\r
                static llvm::Type *getType();\r
 \r
        private:\r
                const int alignment;\r
        };\r
 \r
+    RValue<Pointer<Byte> > operator+(RValue<Pointer<Byte> > lhs, int offset);\r
+    RValue<Pointer<Byte> > operator+(RValue<Pointer<Byte> > lhs, RValue<Int> offset);\r
+    RValue<Pointer<Byte> > operator+(RValue<Pointer<Byte> > lhs, RValue<UInt> offset);\r
+    RValue<Pointer<Byte> > operator+=(const Pointer<Byte> &lhs, int offset);\r
+    RValue<Pointer<Byte> > operator+=(const Pointer<Byte> &lhs, RValue<Int> offset);\r
+    RValue<Pointer<Byte> > operator+=(const Pointer<Byte> &lhs, RValue<UInt> offset);\r
+\r
+    RValue<Pointer<Byte> > operator-(RValue<Pointer<Byte> > lhs, int offset);\r
+    RValue<Pointer<Byte> > operator-(RValue<Pointer<Byte> > lhs, RValue<Int> offset);\r
+    RValue<Pointer<Byte> > operator-(RValue<Pointer<Byte> > lhs, RValue<UInt> offset);\r
+    RValue<Pointer<Byte> > operator-=(const Pointer<Byte> &lhs, int offset);\r
+    RValue<Pointer<Byte> > operator-=(const Pointer<Byte> &lhs, RValue<Int> offset);\r
+    RValue<Pointer<Byte> > operator-=(const Pointer<Byte> &lhs, RValue<UInt> offset);\r
+\r
        template<class T, int S = 1>\r
        class Array : public Variable<T>\r
        {\r
@@ -2463,13 +2438,13 @@ namespace sw
                Reference<T> operator[](int index);\r
                Reference<T> operator[](RValue<Int> index);\r
                Reference<T> operator[](RValue<UInt> index);\r
-\r
-       //      friend RValue<Array<T> > operator++(const Array<T> &val, int);   // Post-increment\r
-       //      friend const Array<T> &operator++(const Array<T> &val);   // Pre-increment\r
-       //      friend RValue<Array<T> > operator--(const Array<T> &val, int);   // Post-decrement\r
-       //      friend const Array<T> &operator--(const Array<T> &val);   // Pre-decrement\r
        };\r
 \r
+//     RValue<Array<T> > operator++(const Array<T> &val, int);   // Post-increment\r
+//     const Array<T> &operator++(const Array<T> &val);   // Pre-increment\r
+//     RValue<Array<T> > operator--(const Array<T> &val, int);   // Post-decrement\r
+//     const Array<T> &operator--(const Array<T> &val);   // Pre-decrement\r
+\r
        llvm::BasicBlock *beginLoop();\r
        bool branch(RValue<Bool> cmp, llvm::BasicBlock *bodyBB, llvm::BasicBlock *endBB);\r
        bool elseBlock(llvm::BasicBlock *falseBB);\r