[PATCH 3/5] target/i386/ops_sse: Include missing "cpu.h" header

Philippe Mathieu-Daudé posted 5 patches 3 years, 1 month ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Wenchao Wang <wenchao.wang@intel.com>, Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <r.bolshakov@yadro.com>
[PATCH 3/5] target/i386/ops_sse: Include missing "cpu.h" header
Posted by Philippe Mathieu-Daudé 3 years, 1 month ago
'Reg' is defined as 'MMXReg', itself declared in "cpu.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/i386/ops_sse.h        | 1 +
 target/i386/ops_sse_header.h | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/target/i386/ops_sse.h b/target/i386/ops_sse.h
index 3cbc36a59d..68c88c9ee3 100644
--- a/target/i386/ops_sse.h
+++ b/target/i386/ops_sse.h
@@ -19,6 +19,7 @@
  */
 
 #include "crypto/aes.h"
+#include "cpu.h"
 
 #if SHIFT == 0
 #define Reg MMXReg
diff --git a/target/i386/ops_sse_header.h b/target/i386/ops_sse_header.h
index 8a7b2f4e2f..5631a6d1e1 100644
--- a/target/i386/ops_sse_header.h
+++ b/target/i386/ops_sse_header.h
@@ -16,6 +16,9 @@
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
+
+#include "cpu.h"
+
 #if SHIFT == 0
 #define Reg MMXReg
 #define SUFFIX _mmx
-- 
2.38.1


Re: [PATCH 3/5] target/i386/ops_sse: Include missing "cpu.h" header
Posted by Richard Henderson 3 years, 1 month ago
On 12/16/22 14:01, Philippe Mathieu-Daudé wrote:
> 'Reg' is defined as 'MMXReg', itself declared in "cpu.h".
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/i386/ops_sse.h        | 1 +
>   target/i386/ops_sse_header.h | 3 +++
>   2 files changed, 4 insertions(+)

No, both of these are multiply included.
If you like, rename them "*.inc.h".


r~