C++ doesn't run on the processor.
Java doesn't run on the processor.
Compiled C++ might run on the processor, or might run through some levels of intermediate languages, intermediate virtual machines, and physical machines until it hits actual metal.
Compiled Java might run on the processor, or might run through intermediate language directly on a processor, or a JVM, or other layers until it hits actual metal.
Also, the CPUs vary, they take the ‘big’ instructions, decode them into micro-ops, and process them uniquely to that processor.
All of these details about floating point math tend to follow the IEEE 754 standard, or have documented exceptions from the standard. There are multiple representations of zero which all compare equal to each other. There are also encodings which are non-zero which can compare equal to zero, such as subnormal numbers. Processors can support features like DAZ (Denormals Are Zero) so any value that is denormal also results in a comparison as zero, they are not the same as +0.0 or -0.0 and yet when compared against them, so something like the SSE instructions COMISD or CMPPD will contain a non-zero value yet still compare as though it were zero.
(As an aside, in some ways it is like null pointer constants. It can be surprising for some programmers to learn there are many different values on systems which can all be null pointer constants, and null pointers can be different sizes like the old PC memory models of near-pointers, far-pointers, and huge pointers that were 16-bit and 32-bit sizes, and yet all the various null pointer constants are guaranteed that they can all be compared to each other and to a zero pointer. There are some special values that can have many different representations but the language mandates they must be comparable in specific ways regardless of the implementation cost.)
Exactly which CPU instructions get used will vary based on what compilers you're using and what processor your targeting. Today's desktop processors have several different ways to run them, either in the FPU stack or with SIMD instructions, and they both behave differently. Regardless of the implementation details, they must follow the language mandate that they ultimately compare equal.
Compiler options can change it, for example, Java's -strictfp can enforce additional conversions and additional comparisons that might not otherwise be there. Faster floating point optimization can cause scenarios to be missed, such as subnormal numbers not being treated as equivalent to zero, or not.
At the C++ level or the Java level, +0.0 and -0.0 compare equal because both language standards declare that they do, regardless of the CPU, the architecture, the physical chip, or anything else. They do it because the language says to do it without regard for the complexity or how many CPU instructions it takes.